Posts

Showing posts with the label apt

-E option to export environment variable to sudoer

Have you ever faced a problem adding ppa (Personal Package Archive) in your computer. If you are getting error like Please check your internet connection then probably the reason is sudo is not able to find proxy setting. This may happen if proxy is only set to .profile or .bashrc file. So to overcome this problem I have already wrote one post before. Here I am showing another option which is bit easier option. Here you have to add -E while running sudo (note: E is in capital letter). So -E option actually preserve the environment option . See the Sudo Manual for more detail. So to add ppa run the following command sudo -E add-apt-repository ppa:<paa_name> This should work now. Cheers APaul Source http://askubuntu.com/questions/212132/i-cant-add-ppa-repository-behind-the-proxy http://www.sudo.ws/sudo/man/sudo.html http://apurbapaul.blogspot.in/2012/09/adding-repository-behind-proxy-using.html

"could not get lock /var/lib/apt/lists/lock" problem

Some time when we run sudo apt-get update command we see the following error message: sudo apt-get update && sudo apt-get upgrade Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) One possible reason for this error is that you are probably running synaptic package manager or some installation is still going on on software manager or some where some installation or update or up-gradation is going on in system. But some time you find that nothing is going on but it still showing same problem. Then you can solve the problem using following command sudo rm /var/lib/apt/lists/* -vf sudo apt-get update && sudo apt-get upgrade Now your update should start properly. Cheers A.Paul