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

Asked by jelche

trying to install some phuision paseenger but keep getting this message:

E: Could not open lock flie /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
jelche
Solved:
Last query:
Last reply:
Revision history for this message
Koen (koen-beek) said :
#1

you may need to remove the lockfile

sudo rm /var/lib/dpkg/lock

Revision history for this message
jelche (campbell-justin-k) said :
#2

Negative...says

cannot remove '/var/lib/dpkg/': Is a directory

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Please give us which command you are typing...

Thank you

Revision history for this message
jelche (campbell-justin-k) said :
#4

Well, I've tired to install Beagle (apt-get install beagle); VLC ( apt-get install vlc )

so I guess the command is the (apt-get install).

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

You must use sudo to give administration commands to Ubuntu...

Play mp3 and dvd under Ubuntu

First please install https://help.ubuntu.com/community/RestrictedFormats

You need to have extra repositories enabled..

Please first enable the multiverse repository:

Open System → Administration → Software sources → [ Tab Ubuntu software ]
enable "Software restrictecd by copyright or legal issue ( multiverse )"
Close and confirm the repository reload.

Type the following command in a terminal (applications → accessories → terminal)

sudo aptitude install vlc

To get better dvd playback first you need to add the medibuntu http://www.medibuntu.org/ repository to your /etc/apt/sources.list file:
here howto add https://help.ubuntu.com/community/Medibuntu here the medibuntu available software list http://packages.medibuntu.org/

Then to install:

sudo apt-get update
sudo aptitude install libdvdread3 libdvdnav4 libdvdcss2
sudo aptitude install non-free-codecs gstreamer0.10-pitfdll w32codecs ubuntu-restricted-extras

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps

Revision history for this message
jelche (campbell-justin-k) said :
#6

I got as far as:

sudo aptitude install libdvdread3 libdvdnav4 libdvdcss2

and I get this:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#7

You must run only one package manager a time, please close Synaptic or other packager manager opened...

To be sure no other package manager is opened you can also reboot your pc...

Thank you

Revision history for this message
jelche (campbell-justin-k) said :
#8

Ok, rebooted my machine and now get the following:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

when I run

sudo aptitude install libdvdread3 libdvdnav4 libdvdcss2.

Sorry I'm still learning. Thank you for all your help in this matter...

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#9

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#10

Then go on with your install commands

sudo aptitude install libdvdread3 libdvdnav4 libdvdcss2

Hope this helps

Revision history for this message
jelche (campbell-justin-k) said :
#11

ok, go to:

sudo apt-get --fix-missing install
and it then says:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily
unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is
another process using it?

when I put in the (sudo apt-get -f install) the terminal turns blue and
there is a java statment.

How do I end a process?

On Mon, 2008-11-10 at 23:41 +0000, marcobra wrote:
> Your question #50844 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/50844
>
> Status: Open => Answered
>
> marcobra proposed the following answer:
> Open a Terminal from the menu Applications → Accessories → Terminal and type:
> (when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)
>
> sudo dpkg --configure -a
> sudo apt-get -f install
> sudo apt-get --fix-missing install
> sudo apt-get clean
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get dist-upgrade
> sudo apt-get clean
> sudo apt-get autoremove
>
> Hope this helps
>

Revision history for this message
jelche (campbell-justin-k) said :
#12

Restarted the computer several times and finally the above worked. Thank you for you help on this.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#13

Whene the pc start it run a check for available updates so into the first minutes might be it try to fetch repository index and you will not able to run any other packages manager...

More settings you will find under System → Administration → Sofware sources [ updates ] tab...

Hope this helps

Revision history for this message
Yuri_Tukmakov (tukmakov-time) said :
#14

I recently encountered a similar problem when trying to install the program. To solve this problem, I introduced a single command: $ sudo!! Then put sudo apt-get install easytag and I have everything worked as before. I do not see much in the process, but it helped me. I hope this helps you too!