LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/could-not-open-lock-file-var-lib-dpkg-lock-open-13-permission-denied-825270/)

basina 08-10-2010 04:06 AM

Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
 
Hi one and all, this is basina and i'm new to linux.
I've installed ubuntu9.04 in my laptop.While i'm installing java, below error is occuring.
Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
please tell me how to rectify this problem clearly.

Thank you n keep smiling

Regards
basina

Meson 08-10-2010 05:57 AM

Do you have another package handler like apt-get, aptitude, or synaptics running? If not, just manually delete it:
Code:

sudo rm /var/lib/dpkg/lock

hanzerik 08-10-2010 09:53 AM

The only times I have seen an error like that is when I have forgotten to issue the "sudo" command before the command I want to run; mainly the "apt-get install <package>" one.

Should be
Code:

sudo apt-get install package

hewhohasnoone 09-05-2011 05:18 PM

Thank you so much! You're right!

It's not that I forgot to add the "sudo" before, it's that I wasn't instructed to. Regardless, that did the trick. Now I no longer receive that could not open lock file blah blah message.


All times are GMT -5. The time now is 11:58 PM.