LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can not install new software on my system (https://www.linuxquestions.org/questions/linux-software-2/can-not-install-new-software-on-my-system-4175422314/)

skeeve146 08-15-2012 10:55 PM

Can not install new software on my system
 
Hello,

When I try to download new software or upgrade on Ubuntu 12.04 I get this error message:
dpkg: syntax error: unknown user'amavis' in stateoverride file
E: Sub-process /usr/bin/dpkg returned and error code(2)
A package failed to install. Trying to recover:

June 2005 Stephan789, using Debian Etch, posted this question and the answer is:
delete
/var/lib/dpkg/stateoverride
delete
/var/lib/dpkg/
lock
sudo dpkg --configure -a
sudo apt-get -f install
Being new to this how do you go about deleteing /var/lib/dpkg/stateoverride and /var/lib/dpkg/lock.
Will this also work on Ubuntu 12.04?
This is also the only place this past week I have found an answer.

earthnet 08-16-2012 10:47 AM

How are you trying to install software? From the command line? From the package manager?

skeeve146 08-16-2012 11:35 AM

Have tried both.
Tried sudo dpkg --configure -a and got no response.
sudo apt-get -f install
got this

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libva-x11-1 libxcb-keysyms1 libbluray1 libresid-builder0c2a libxcb-xv0
libtar0 libgmtk0 libcddb2 libdvbpsi7 libvlc5 libupnp3 libaacs0 libcrystalhd3
libxcb-randr0 libxcb-composite0 libgmtk0-data libsidplay2 libvdpau1 vlc-data
libvlccore5 libgmlib0 libebml3 libmatroska5 libsdl-image1.2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libpostproc52
The following NEW packages will be installed:
libpostproc52
0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
Need to get 0 B/116 kB of archives.
After this operation, 408 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: unrecoverable fatal error, aborting:
syntax error: unknown user 'amavis' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

skeeve146 08-16-2012 11:42 AM

forgot to mention did do apt-get autoremove
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?
how do I find if I have root?

frankbell 08-16-2012 09:19 PM

In Ubuntu, you must use sudo to install and remove software and configure global settings.

This article will tell you more. https://help.ubuntu.com/community/RootSudo

guyonearth 08-16-2012 09:39 PM

Create a new user for yourself and try running it from that account. If it works, there is an issue with the account you were trying to use, maybe one too many tweaks.

skeeve146 08-17-2012 12:36 AM

I now have a better understanding of root sudo.

What ever I do it comes down to these two "lines"
/var/lib/dpkg/stateoverride
/var/lib/dpkg/lock
how do I go about to remove them?

Doing more research, "dpkg is the software at the base of the Debian package management system." Should this even be on my system, Ubuntu?

kedarp 08-17-2012 02:18 AM

Code:

$sudo rm /var/lib/dpkg/statoverride
Look at "statoverride", its not "stateoverride"

Code:

$sudo rm /var/lib/dpkg/lock
Ubuntu uses dpkg, debian package management system. It is derived from Debian. So it is
present on your system.

Code:

$sudo dpkg --configure -a
$sudo apt-get -f install

Quote:

June 2005 Stephan789, using Debian Etch, posted this question
You should mention the link of the thread where you found the above commands.

skeeve146 08-17-2012 08:42 PM

Thanks this worked, I want to thank all of you that helped me with this problem.


All times are GMT -5. The time now is 08:48 PM.