Other

Could not open lock file /var/lib/dpkg/lock (apt-get install)

Could not open lock file /var/lib/dpkg/lock

While using apt-get install or apt-get upgrade and also trying to install any software through apt command getting an error like.

[email protected]:~$ apt-get install yum

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?

Now, what you have to do is simply type sudo su Now you have super user privileges.

[email protected]:~$ sudo su
[email protected]:/home/ubuntu#

Now, just type apt-get update this is for updating your source list.

[email protected]:/home/ubuntu# apt-get update
Ign cdrom://Lubuntu 15.10 _Wily Werewolf_ - Release i386 (20151021) wily InRelease
Ign cdrom://Lubuntu 15.10 _Wily Werewolf_ - Release i386 (20151021) wily/main Translation-en_US
Ign cdrom://Lubuntu 15.10 _Wily Werewolf_ - Release i386 (20151021) wily/main Translation-en
Ign cdrom://Lubuntu 15.10 _Wily Werewolf_ - Release i386 (20151021) wily/multiverse Translation-en_US
Ign cdrom://Lubuntu 15.10 _Wily Werewolf_ - Release i386 (20151021) wily/multiverse Translation-en

After finishing this now you can get any software by.

apt-get install *******

Comment for any questions.

Related Articles

Back to top button