Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I have in stalled a dual boot beside windows and now I'm having a problem checking apt-get update when I type in apt-get update this is the outcome. I don't know what to do

$ apt-get update  
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)  
E: Unable to lock directory /var/lib/apt/lists/  
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)  
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?  

$ apt-get upgrade  
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)  
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?  
share|improve this question

marked as duplicate by Oli Mar 10 at 17:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

Have you tried putting sudo in front of your commands? Like this:

sudo apt-get update
sudo apt-get upgrade

This is necessary for every apt command, except for apt-cache.

The sudo command will temporarily set your rights to that of root user, which is necessary for certain programs.

share|improve this answer
    
yup this is the mistake –  Karthik T Nov 5 '12 at 7:32
    
Also cd apt-get update doesn't make sense, unless you have a directory named apt-get in your current directory. –  green7 Nov 5 '12 at 10:26

Open terminal and run following commnads:

sudo rm /var/lib/dpkg/lock
sudo apt-get update
sudo apt-get upgrade 
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.