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 managed to break my package management. If I try to make an upgrade, I get:

$ sudo apt-get dist-upgrade
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:
 libapt-pkg4.12 : Breaks: libapt-pkg4.12:i386 (!= 0.8.16~exp12ubuntu10.3) but 0.8.16~exp12ubuntu10.2 is installed
 libapt-pkg4.12:i386 : Breaks: libapt-pkg4.12 (!= 0.8.16~exp12ubuntu10.2) but 0.8.16~exp12ubuntu10.3 is installed
E: Unmet dependencies. Try using -f.

Then I try to follow apt-get recommendation:

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  libapt-inst1.4:i386 libapt-pkg4.12:i386
0 upgraded, 0 newly installed, 2 to remove and 33 not upgraded.
48 not fully installed or removed.
After this operation, 3 866 kB disk space will be freed.
Do you want to continue [Y/n]? 
E: Internal Error, No file name for libapt-pkg4.12

Kubuntu 12.04 64bit. Can anyone help me to solve it?

share|improve this question
add comment

2 Answers 2

up vote 9 down vote accepted

Run:

dpkg --configure -a

and try again.

You can also download the libapt-pkg package from here and install it manually:


If the above commands don't work:

Update: The command below doesn't work. Download the appropriate version directly at http://security.ubuntu.com/ubuntu/pool/main/a/apt/.

Download the package using the following command:

wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb

Now remove the currently installed package:

sudo dpkg --force-depends -r libapt-pkg4.12
sudo dpkg --force-depends -r libapt-pkg4.12:i386

Then, install the downloaded package:

sudo dpkg -i libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb

Run, the following command again and check:

sudo apt-get -f install 
share|improve this answer
    
Did that. It finished upgrade, but I still get this when I try to upgrade: The following packages have unmet dependencies: libapt-pkg4.12 : Breaks: libapt-pkg4.12:i386 (!= 0.8.16~exp12ubuntu10.3) but 0.8.16~exp12ubuntu10.2 is installed libapt-pkg4.12:i386 : Breaks: libapt-pkg4.12 (!= 0.8.16~exp12ubuntu10.2) but 0.8.16~exp12ubuntu10.3 is installed –  Märt Rang Aug 22 '12 at 9:25
    
try the updated answer. –  green7 Aug 22 '12 at 9:54
1  
thanks, it works now. I had to remove libapt-pkg4.12:i386 too. Linux package management can cause a lot of headaches. –  Märt Rang Aug 22 '12 at 10:16
    
updated the answer, thanks! :) –  green7 Aug 22 '12 at 12:27
    
For wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_‌​amd64.deb I get the error: HTTP request sent, awaiting response... 404 Not Found 2012-10-06 22:04:10 ERROR 404: Not Found. . Gulp. –  Mochan Oct 6 '12 at 12:04
show 2 more comments

This is how I did it:

First, I downloaded this 2 deb files:

apt_0.9.7.7ubuntu3_i386.deb
libapt-pkg4.12_0.9.7.7ubuntu3_i386.deb

Second, I run this command:

sudo dpkg --force-depends -r libapt-pkg4.12

Then I install the 2 deb files with this command:

sudo dpkg -i apt_0.9.7.7ubuntu3_i386.deb libapt-pkg4.12_0.9.7.7ubuntu3_i386.deb

and it works....

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.