1

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?  
Oli
  • 293,335

2 Answers2

4

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.

Karthik T
  • 2,031
Cheiron
  • 318
0

Open terminal and run following commnads:

sudo rm /var/lib/dpkg/lock
sudo apt-get update
sudo apt-get upgrade 
KK Patel
  • 19,083