Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Apt-get fun

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1901
Location: Cheshire, UK

PostPosted: Sun Mar 09, 2014 8:41 pm    Post subject: Apt-get fun Reply with quote

As superuser:

apt-get update & apt-get upgrade && apt-get clean && apt-get autoclean && apt-get autoremove
[1] 2244
Reading package lists... Done
Ign http://archive.ubuntu.com saucy InRelease
.
.
.
Fetched 540 kB in 6s (77.9 kB/s)
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Reading package lists... Error!
E: Problem renaming the file /var/cache/apt/srcpkgcache.bin.leMXQh to /var/cache/apt/srcpkgcache.bin - rename (2: No such file or directory)
E: Problem renaming the file /var/cache/apt/pkgcache.bin.hcWp2B to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
[1]+ Exit 100 apt-get update


Any idea what to do? It's a fresh Mint Mate 32bit install of the LXF disc to the Dell machine in my sig (I managed to bugger up the last one so I had to reinstall).
_________________
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2430

PostPosted: Sun Mar 09, 2014 11:20 pm    Post subject: Reply with quote

Use lsof to see which process is keeping the lock file:
Code:
lsof | grep /var/lib/dpkg/lock

Note the PID of the offending process and use the kill command to make sure it's there no more Twisted Evil

Now, as root, start aptitude. It should fire up w/o issues. Close it (q key, confirm with y) and re-issue the command you started this thread with Smile
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 445

PostPosted: Mon Mar 10, 2014 7:21 am    Post subject: Reply with quote

By the way, there's no point in running apt-get autoclean after apt-get clean. The 'clean' command will have already deleted all the downloaded packages, so there will be nothing left to autoclean.
_________________
Eric
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1901
Location: Cheshire, UK

PostPosted: Wed Mar 12, 2014 2:06 pm    Post subject: Reply with quote

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Reading package lists... Error!
E: Problem renaming the file /var/cache/apt/pkgcache.bin.pxPAAK to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)
W: You may want to run apt-get update to correct these problems
[1]+ Exit 100 apt-get update
[100]************** ~ # lsof | grep /var/lib/dpkg/locklsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.

Ok. I'm lost. Any help please? Confused


PS. Roseway, I'll try and remember to change the string of commands next time. I normally just use the arrows to grab it.
_________________
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8452
Location: Warrington, UK

PostPosted: Wed Mar 12, 2014 7:39 pm    Post subject: Reply with quote

Do you have another process running, like an update checker or package manager, that might already be locking the file?

If not, what is the output from

Code:
sudo ls -l /var/lib/dpkg
sudo ls -ld /var/lib/dpkg

_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1901
Location: Cheshire, UK

PostPosted: Wed Mar 12, 2014 8:31 pm    Post subject: Reply with quote

Just booted up. Here goes...


*******@*******:~ > sudo ls -l /var/lib/dpkg
[sudo] password for *******:
total 8164
drwxr-xr-x 2 root root 4096 Mar 12 11:43 alternatives
-rw-r--r-- 1 root root 1962491 Mar 12 14:02 available
-rw-r--r-- 1 root root 1962474 Mar 12 11:15 available-old
-rw-r--r-- 1 root root 8 Nov 28 14:52 cmethopt
-rw-r--r-- 1 root root 433 Mar 9 09:55 diversions
-rw-r--r-- 1 root root 468 Mar 9 09:55 diversions-old
drwxr-xr-x 2 root root 393216 Mar 12 14:02 info
-rw-r----- 1 root root 0 Mar 12 14:02 lock
drwxr-xr-x 2 root root 4096 Oct 4 08:24 parts
-rw-r--r-- 1 root root 163 Nov 28 15:49 statoverride
-rw-r--r-- 1 root root 1998530 Mar 12 14:02 status
-rw-r--r-- 1 root root 1998677 Mar 12 14:02 status-old
drwxr-xr-x 2 root root 4096 Mar 12 14:02 triggers
drwxr-xr-x 2 root root 4096 Mar 12 14:02 updates
*******@*******:~ > sudo ls -ld /var/lib/dpkg
drwxr-xr-x 7 root root 4096 Mar 12 14:02 /var/lib/dpkg
_________________
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1901
Location: Cheshire, UK

PostPosted: Wed Mar 12, 2014 8:32 pm    Post subject: Reply with quote

*******@*******:~ > lsof | grep /var/lib/dpkg/lock
[1]*******@*******:~ >
_________________
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1901
Location: Cheshire, UK

PostPosted: Wed Mar 12, 2014 8:37 pm    Post subject: Reply with quote

Ok. Did my wonderfully long string of update, upgrade etc.

all went well until...

Ign http://packages.linuxmint.com petra/upstream Translation-en_GB
Ign http://packages.linuxmint.com petra/upstream Translation-en
Fetched 115 kB in 32s (3,530 B/s)
Reading package lists... Done

And it hangs. 5 minutes now. Confused
_________________
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast