apt-get

Cannot install packages inside docker Ubuntu image

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I installed Ubuntu 14.04 image on docker. After that, when I try to install packages inside the ubuntu image, I'm getting unable to locate package error: apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package curl How to fix this error? 回答1: It is because there is no package cache in the image, you need to run: apt-get -qq update before installing packages, and if your command is in a Dockerfile, you'll then need: apt-get -qq -y install curl 回答2: From the docs

How can I get Chef to run apt-get update before running other recipes

拥有回忆 提交于 2019-12-03 02:34:52
问题 Right now I have the following in my Vagrantfile: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookbooks" chef.add_recipe "apt" chef.add_recipe "build-essential" chef.add_recipe "chef-redis::source" chef.add_recipe "openssl" chef.add_recipe "git" chef.add_recipe "postgresql::server" chef.add_recipe "postgresql::client" end In order to install the software added to my recipe_list, I need to get the VM to issue an apt-get update before installing the other software. I was

Installing lxml with pip in virtualenv Ubuntu 12.10 error: command 'gcc' failed with exit status 4

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having the following error when trying to run "pip install lxml" into a virtualenv in Ubuntu 12.10 x64. I have Python 2.7. I have seen other related questions here about the same problem and tried installing python-dev, libxml2-dev and libxslt1-dev. Please take a look of the traceback from the moment I tip the command to the moment when the error occurs. Downloading/unpacking lxml Running setup.py egg_info for package lxml /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg

Nodejs ppa:Chris-lea/node.js fails

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Given a nodejs.makefile which contains the commands to install nodejs/npm & some npm packages, such: nodejs: sudo add-apt-repository -y ppa:chris-lea/node.js #install fresh nodejs sudo apt-get update sudo apt-get install -y nodejs sudo npm update -g npm #refresh npm sudo npm install -g topojson jsdom minimist #install npm modules npm cache clean I then run : sudo make -f nodejs.makefile but I get stopped at the sudo apt-get update level (command 2) by the error : ... #some messages here apt-get update ... #many other messages there Ign http:

apt-get和yum

▼魔方 西西 提交于 2019-12-03 02:27:13
1、apt-get是dpkg系的,或者说debian系的,如ubuntu 2、yum是红帽系的,如中标麒麟 来源: https://www.cnblogs.com/judes/p/11771587.html

Dockerfile fails to build

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Till few days back the Dockerfile was working fine and when i tried to build it again today it is giving following error in the terminal. I tried with multiple docker base images but still giving the same error. Can any one help me with this? I dont think i missed out anything. If i had missed it should have given me the error earlier itself but why now? Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease Temporary failure resolving 'security.ubuntu.com' Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary failure

Android adb not found

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I run my android app from eclipse, I get this error. Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2 No such file or directory' while attempting to get adb version from /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb COPY PASTE FROM Eclipse Error [2012-11-26 13:43:08 - adb] Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '

Check if a package is installed and then install it if it's not

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm working on a Ubuntu system and currently this is what I'm doing: if ! which command > /dev/ null ; then echo - e "Command not found! Install? (y/n) \c" read if "$REPLY" = "y" ; then sudo apt - get install command fi fi Is this what most people would do? Or is there a more elegant solution? 回答1: To check if packagename was installed, type: dpkg - s You can also use dpkg-query that has a neater output for your purpose, and accepts wild cards, too. dpkg - query - l To find what package owns the command , try: dpkg - S `which ` For

building Python from source with zlib support

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When building Python 3.2.3 from source on Ubuntu 12.04, the zlib module is not available. I downloaded the official source distribution from python.org, and attempted to build and install it with the following commands. tar xfa Python3.2.3.tar.bz2 cd Python-3.2.3 ./configure --prefix=/opt/python3.2 make sudo make install The make command output includes the following. Python build finished, but the necessary bits to build these modules were not found: _curses _curses_panel _dbm _gdbm _sqlite3 _ssl _tkinter bz2 readline zlib After running

apt-get update' returned a non-zero code: 100

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a docker image from my docker file which has following contains FROM ubuntu:14.04.4 RUN echo 'deb http://private-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.4.2.0 HDP main' >> /etc/apt/sources.list.d/HDP.list RUN echo 'deb http://private-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu14 HDP-UTILS main' >> /etc/apt/sources.list.d/HDP.list RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list RUN gpg --keyserver pgp.mit