apt-get autoremove error

Asked by Neisha

 apt-get autoremove
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 do i do next to solve this?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Steven Danna (ssd7) said :
#1

Two things to check.

1) Are you running the command using sudo? You need root privileges to run that command. To get those privileges, use sudo:

sudo apt-get autoremove

2) Is Synaptic or another package manager running?

Revision history for this message
Neisha (candywoman407) said :
#3

i used that command but it said something about manually run dpkg --configure -a to correct the problem i typed that command in but it gave me anoother message saying: dpkg: requested operation requires superuser privilege

Revision history for this message
Steven Danna (ssd7) said :
#4

Try:

sudo dpkg --configure -a

Revision history for this message
Neisha (candywoman407) said :
#5

when i did that command this is what I got dpkg: dependency problems prevent configuration of openoffice.org-impress:
 openoffice.org-impress depends on openoffice.org-core (= 1:2.4.1-1ubuntu2.1); however:
  Version of openoffice.org-core on system is 1:2.4.1-1ubuntu2.
dpkg: error processing openoffice.org-impress (--configure):
 dependency problems - leaving unconfigured
dpkg: error processing linux-image-2.6.24-22-lpia (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
dpkg: dependency problems prevent configuration of sun-java6-jre:
 sun-java6-jre depends on sun-java6-bin (= 6-07-3ubuntu2) | ia32-sun-java6-bin (= 6-07-3ubuntu2); however:
  Version of sun-java6-bin on system is 6-06-0ubuntu1.
  Package ia32-sun-java6-bin is not installed.
dpkg: error processing sun-java6-jre (--configure):
 dependency problems - leaving unconfigured
Setting up dbus (1.1.20-1ubuntu3.1netbook0belmont1) ...
The user `messagebus' already exists. Exiting.

dpkg: dependency problems prevent configuration of openoffice.org-draw:
 openoffice.org-draw depends on openoffice.org-core (= 1:2.4.1-1ubuntu2.1); however:
  Version of openoffice.org-core on system is 1:2.4.1-1ubuntu2.
dpkg: error processing openoffice.org-draw (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-calc:
 openoffice.org-calc depends on openoffice.org-core (= 1:2.4.1-1ubuntu2.1); however:
  Version of openoffice.org-core on system is 1:2.4.1-1ubuntu2.
dpkg: error processing openoffice.org-calc (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-writer:
 openoffice.org-writer depends on openoffice.org-core (= 1:2.4.1-1ubuntu2.1); however:
  Version of openoffice.org-core on system is 1:2.4.1-1ubuntu2.
dpkg: error processing openoffice.org-writer (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on openoffice.org-core (= 1:2.4.1-1ubuntu2.1); however:
  Version of openoffice.org-core on system is 1:2.4.1-1ubuntu2.
dpkg: error processing python-uno (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sun-java6-plugin:
 sun-java6-plugin depends on sun-java6-bin (= 6-07-3ubuntu2); however:
  Version of sun-java6-bin on system is 6-06-0ubuntu1.
dpkg: error processing sun-java6-plugin (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openoffice.org-impress
 linux-image-2.6.24-22-lpia
 sun-java6-jre
 openoffice.org-draw
 openoffice.org-calc
 openoffice.org-writer
 python-uno
 sun-java6-plugin

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

ok make sure you do not have any package managers open (synaptic etc) and run:

sudo apt-get clean; sudo apt-get update; sudo apt-get -f install

Notice how ALL the commands have sudo at the beginning. This is because installing and uninstalling packages is an administritive task. If you run the command without sudo, it will be running as at a user level so you will be told you arenot permitted to do this as you are only a user.
You gain elevated priveledges to perform administritive tasks by useing sudo (for command line commands) and gksudo (for running graphical apps), if you put sudo or gksudo at the start of a command and are a membe of the admin group, you can authenticate yourself and you will be allowed to do whatever you like.

Can you help with this problem?

Provide an answer of your own, or ask Neisha for more information if necessary.

To post a message you must log in.