0

I tried apt-get update and upgrade together and this is what I got.

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?

What should I do?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Chinmaya K R
  • 88
  • 1
  • 8

4 Answers4

1

Have you tried using sudo?

Updating applications requires you to use administrative powers, which for security reasons are locked behind sudo.

Try using:

sudo apt-get update

and

sudo apt-get upgrade

and enter your password to upgrade your programs.

StAlRuth
  • 113
1

To run both apt-get update and apt-get upgrade you need superuser privilege. You can run these together as,

sudo apt-get update && sudo apt-get upgrade 

And obviously you need to give your administrative password.

sourav c.
  • 44,715
0

The command apt-get update and apt-get upgrade requires you to be a root.

You have to do this way:

sudo apt-get update
sudo apt-get upgrade

Then you are prompted to enter your password. Enter it and enjoy :)

Maythux
  • 84,289
0

You want to superuser privilege to run these... Then, you should be superuser.. To be Superuser.. you should add "Sudo" to these commands.

Try this...

sudo apt-get update

sudo apt-get upgrade

And if it is asking a password, Then, Give your Password And Hit the Enter button..

LG Guy
  • 11
  • 3