Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to remove a package: sudo apt-get remove pgbouncer but then I got the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-server : Depends: linux-image-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
                Depends: linux-headers-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

The I tried sudo apt-get -f install but then I get:

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:
  linux-headers-3.2.0-38 linux-image-3.2.0-38-generic libpgpool0 linux-headers-3.2.0-38-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-server
The following packages will be upgraded:
  linux-server
1 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,732 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.44.53); however:
  Version of linux-image-server on system is 3.2.0.45.54.
 linux-server depends on linux-headers-server (= 3.2.0.44.53); however:
  Version of linux-headers-server on system is 3.2.0.45.54.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I get this annoying problem fixed?

share|improve this question
    
Please see How do I resolve unmet dependencies? –  Eric Carvalho Jun 5 '13 at 12:01
    
This answer seems to work for me: askubuntu.com/questions/264331/… –  hedefalk Sep 6 '13 at 17:10
add comment

1 Answer 1

up vote 1 down vote accepted

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

After trying

sudo dpkg --configure -a

and

sudo apt-get install -f

the problem of a broken package still exist the solution is to edit the dpkg status file manually.

sudo gedit /var/lib/dpkg/status  

(you can use vi or nano instead of gedit)

Locate the corrupt package, and remove the whole block of information about it and save the file.

if this dont help u...go through

http://ubuntuforums.org/showthread.php?t=1642173

http://www.linuxquestions.org/questions/debian-26/sub-process-usr-bin-dpkg-returned-an-error-code-1-a-171107/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.