In the newly installed system I got this massage when I tried to install some package in Ubuntu, even update was also not working.
Some time it happens due to unclean shutdown also.
I thought some package has corrupted so I run “dpkg --configure –a” and “apt-get install –f” but that was not the solution, problem remain same. L
After some time I got the solution…
Lastly I deleted some file which I am mentioning bellow….
1st I delete the lock files....
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/apt/lists/lock
then apt-get update
.......
If its not solved you issue.. Please try bellow steps.. Thanks fr2632 for your comments..
sudo apt-get install deborphan
and
sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get remove --purge `deborphan` && sudo dpkg --purge `COLUMNS=300 dpkg -l "*" | egrep "^rc" | cut -d\ -f3`
If its not solved you issue.. Please try bellow steps.. Thanks fr2632 for your comments..
sudo apt-get install deborphan
and
sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get remove --purge `deborphan` && sudo dpkg --purge `COLUMNS=300 dpkg -l "*" | egrep "^rc" | cut -d\ -f3`
Your suggestion worked very well. Thanks.
ReplyDeletehappy to know that..
Deletewelcome all.
ReplyDeleteit still doesnt work !!!
ReplyDelete0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sss@sss-laptop:~$ sudo rm /var/lib/dpkg/lock
sss@sss-laptop:~$ sudo rm /var/cache/apt/archives/lock
sss@sss-laptop:~$ sudo rm /var/lib/apt/lists/lock
sss@sss-laptop:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock the list directory
sss@sss-laptop:~$
its showing open.. close that.. but anyways.. you can remove it as Administrator..
Deletedid you run "dpkg --configure –a" and apt-get install –f.
ReplyDelete:( i recently got this phone and when i typed dpkg --configure –a... it tells me it's password locked.... do u think the other guy whom i bought it from has the password for it?
ReplyDeleteyes.. you should have Administrator or sudo authentication to run that.
Deletetype
ReplyDeletesudo apt-get update
I change the privilege of the lock files to rw and it flies
ReplyDeleteis that solve your problem ?
DeleteOk, solved with:
ReplyDeletesudo apt-get install deborphan
and
sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get remove --purge `deborphan` && sudo dpkg --purge `COLUMNS=300 dpkg -l "*" | egrep "^rc" | cut -d\ -f3`
Maybe can be useful to somebody ;)
thank for the update bro.. i will update this on the post.. so it can help others.. :)
DeleteThe issue won't gone:
DeleteWhiteHorse@U13.04-desktop:~$ sudo apt-get install deborphan
sudo: unable to resolve host U13.04-desktop
[sudo] password for First Strike:
Reading package lists... Error!
E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_raring_universe_binary-i386_Packages (1)
E: The package lists or status file could not be parsed or opened.
I have tried all the solution you have mentioned here but i am still getting the same problem
ReplyDeleteTried this :
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/apt/lists/lock
and this what it returns:
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
its can not be remove, because the file is not exist.
DeleteSorry Sir but it did'nt worked. I am feeling very frustrated please someone provide a proper solution
ReplyDeleteit works ...thank you :)
ReplyDeleteMost Welcome.
DeleteVirtualtech: Could Not Open Lock File /Var/Lib/Apt/Lists/Lock - Open (13: Permission Denied) Or "Unable To Get Exclusive Lock" >>>>> Download Now
ReplyDelete>>>>> Download Full
Virtualtech: Could Not Open Lock File /Var/Lib/Apt/Lists/Lock - Open (13: Permission Denied) Or "Unable To Get Exclusive Lock" >>>>> Download LINK
>>>>> Download Now
Virtualtech: Could Not Open Lock File /Var/Lib/Apt/Lists/Lock - Open (13: Permission Denied) Or "Unable To Get Exclusive Lock" >>>>> Download Full
>>>>> Download LINK