LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   cannot update,upgrade using apt-get...errors (https://www.linuxquestions.org/questions/debian-26/cannot-update-upgrade-using-apt-get-errors-598606/)

vineet7kumar 11-10-2007 11:05 AM

cannot update,upgrade using apt-get...errors
 
hi,
I just switched from fedora core 6 to debian etch.
I am able to install softwares from the DVD but can't install online using apt-get.
Also can't update or upgrade using apt-get.

error on giving the command
# apt-get update
is

E: Could not get lock /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the list directory


the contents of /etc/apt/sources.list file are

#

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40]/ etch contrib main

deb-src cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40]/ etch contrib main


deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-2 20070407-11:40]/ etch contrib main

deb-src cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-2 20070407-11:40]/ etch contrib main

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-3 20070407-11:40]/ etch contrib main

deb-src cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-3 20070407-11:40]/ etch contrib main

# Line commented out by installer because it failed to verify:

deb http://security.debian.org/ etch/updates main contrib
# Line commented out by installer because it failed to verify:
# deb http://http.us.debian.org/debian/ sarge main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib

deb http://ftp.us.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free



I should also mention that I am behind the college Internet proxy.
(Using Internet in the college)

what is the solution?

thanks,
Vineet

Dutch Master 11-10-2007 11:19 AM

That proxy is your problem. I suggest to get the latest DVD version or the net-install cd if you don't want to wait that long ;)

wit_273 11-10-2007 12:17 PM

This error means that another program is opened that uses apt-get. You most likely have Synaptic (or another update program) opened. Close the update program and try again. It would not have anything to do with the proxy as the problem is apt-get needs to get a lock on /var/lib/apt/lists/ but something else (most likely another update program) already has the directory locked. The other cause for this is running apt-get as a regular user, but it appears that you are running as root since the command you showed is proceeded with a #.

George

Zaskar 11-10-2007 01:18 PM

If you dont think you have anything open, it is most likley the synaptic automatic uploader, there should an icon in the upper or lower right corner for it. Somethimes it gets weird and will lock the file even though you havent opened it, something weird just happened with it as it was checking for updates, as its not supposed to lock anything when its just sitting in the bar letting you know you have updates available. Only 1 instance of an update can occur at once as they use the same Apt files. Apt-Get, Aptitude and Synaptic all share them.

Disable it (man I forget how sorry, I use fluxbox so I dont even have to concern myself with that) and just use aptitude for updates, using synaptic can get you into trouble, it tries to force all the packages that would normally be held back by synaptic cause they usually arent finished yet and have dependencies that arent compatible (like for instance ive had synaptic remove all of gnome cause i wasnt paying attention, some package had a dependency for a new version of a file that Gnome depended on also... so it removed gnome to resolve the issue hahahaha.)


All times are GMT -5. The time now is 05:22 PM.