PDA

View Full Version : [SOLVED] Installing Problem



jaaronson
January 25th, 2011, 01:30 AM
I recently put Ubuntu on my XP using wubi and I need help:

I was installing java in terminal with sudo apt-get install x

I forgot exactly what goes where "x" is. The installation stopped when it said it was configuring and it was not doing anything. I closed terminal and now whenever I try to install something in terminal this comes up:

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?

This when I try to install something in Ubuntu Software Center it says it is in progress but it never gets past 0%. I am almost sure it is because of this java that never installed.
Is there something I can do to end the java thing?

What can I do?

Frogs Hair
January 25th, 2011, 02:12 AM
You could try removing the java program from System > Administration > Synaptic Package Manager.

Use quick search to locate the program , right click on the line , mark for complete removal and apply.

Reload the package manager. Another way from the terminal is:
sudo apt-get remove --purge X


sudo apt-get update

jaaronson
January 26th, 2011, 01:34 AM
When I go to Synaptic Package Manager a box comes up and says:

"Unable to get exclusive lock
This usually means that another package management application (like apt-get or aptitude) is already running. Please close that application first."

When I put this code in terminal:

sudo apt-get remove --purge X

I get:

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 this in terminal:

sudo apt-get update

I get this:

Hit http://security.ubuntu.com lucid-security Release.gpg
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Hit http://security.ubuntu.com lucid-security Release
Hit http://archive.canonical.com lucid Release.gpg
Ign http://archive.canonical.com/ubuntu/ lucid/partner Translation-en_US
Hit http://archive.canonical.com lucid Release
Hit http://security.ubuntu.com lucid-security/main Packages
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/gdm2setup/gdm2setup/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://us.archive.ubuntu.com lucid Release.gpg
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
Hit http://archive.canonical.com lucid/partner Packages
Hit http://security.ubuntu.com lucid-security/restricted Packages
Hit http://security.ubuntu.com lucid-security/main Sources
Hit http://security.ubuntu.com lucid-security/restricted Sources
Hit http://security.ubuntu.com lucid-security/universe Packages
Hit http://security.ubuntu.com lucid-security/universe Sources
Hit http://security.ubuntu.com lucid-security/multiverse Packages
Ign http://ppa.launchpad.net/sun-java-community-team/sun-java6/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/ubuntu-tweak-testing/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com lucid-updates Release.gpg
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://security.ubuntu.com lucid-security/multiverse Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://us.archive.ubuntu.com lucid-updates Release
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/restricted Packages
Hit http://us.archive.ubuntu.com lucid/main Sources
Hit http://us.archive.ubuntu.com lucid/restricted Sources
Hit http://us.archive.ubuntu.com lucid/universe Packages
Hit http://us.archive.ubuntu.com lucid/universe Sources
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/multiverse Packages
Hit http://us.archive.ubuntu.com lucid/multiverse Sources
Hit http://us.archive.ubuntu.com lucid-updates/main Packages
Hit http://us.archive.ubuntu.com lucid-updates/restricted Packages
Hit http://us.archive.ubuntu.com lucid-updates/main Sources
Hit http://us.archive.ubuntu.com lucid-updates/restricted Sources
Hit http://us.archive.ubuntu.com lucid-updates/universe Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://us.archive.ubuntu.com lucid-updates/universe Sources
Hit http://us.archive.ubuntu.com lucid-updates/multiverse Packages
Hit http://us.archive.ubuntu.com lucid-updates/multiverse Sources
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?

What can I do?

oldos2er
January 26th, 2011, 05:22 AM
Is there something I can do to end the java thing?

What can I do?

Try
sudo dpkg --configure -aWhen the license agreement comes up, hit Tab to highlight "Ok", then Enter.

Edit: You may need to reboot if you still get the "Unable to lock..." error.

Rubi1200
January 26th, 2011, 08:04 AM
The error message you see can also occur if you have more than one instance of a package manager open.

Meaning, you cannot try and install something in Synaptic and Software Center at the same time.

Close all package managers, terminal etc. Restart and try again following the advice already posted.

Hope this helps.

jaaronson
January 26th, 2011, 10:39 PM
Thank you Oldos2er!
I ran that command and finished the installation. Everything is working great now.