I had the following problem. Tried to do a regular update as normal, and ran into a big snag:
To fix the issue, I tried following the instructions here http://askubuntu.com/questions/17887...libapt-pkg4-12
No love:
So now I really broke apt in an effort to fix it:
Can someone give me advice at how to reinstall apt from a deb file, or where can I get it? I have Kubuntu 64 bit 12.04 with all the latest updates as of the last couple of weeks.
Code:
root@dpich-M6400:/home/dpich/Documents# apt-get -f install ; apt-get update ; apt-get upgrade -y ; apt-get dist-upgrade -y ; apt-get autoclean ; apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: libapt-pkg4.12:i386 The following packages will be upgraded: libapt-pkg4.12:i386 1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 1 not fully installed or removed. Need to get 0 B/941 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y E: Internal Error, No file name for libapt-pkg4.12 Hit http://download.virtualbox.org precise InRelease Ign http://us.archive.ubuntu.com precise InRelease Ign http://us.archive.ubuntu.com precise-updates InRelease Ign http://us.archive.ubuntu.com precise-backports InRelease Hit http://us.archive.ubuntu.com precise Release.gpg Hit http://us.archive.ubuntu.com precise-updates Release.gpg Hit http://download.virtualbox.org precise/contrib amd64 Packages Hit http://us.archive.ubuntu.com precise-backports Release.gpg Hit http://us.archive.ubuntu.com precise Release Hit http://download.virtualbox.org precise/contrib i386 Packages Ign http://security.ubuntu.com precise-security InRelease Ign http://archive.canonical.com precise InRelease Ign http://extras.ubuntu.com precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Hit http://us.archive.ubuntu.com precise-updates Release Hit http://us.archive.ubuntu.com precise-backports Release Ign http://download.virtualbox.org precise/contrib TranslationIndex Hit http://us.archive.ubuntu.com precise/main Sources Hit http://us.archive.ubuntu.com precise/restricted Sources Hit http://us.archive.ubuntu.com precise/universe Sources Hit http://us.archive.ubuntu.com precise/multiverse Sources Hit http://us.archive.ubuntu.com precise/main amd64 Packages Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise/universe amd64 Packages Hit http://security.ubuntu.com precise-security Release.gpg Hit http://archive.canonical.com precise Release.gpg Ign http://ppa.launchpad.net precise InRelease Hit http://extras.ubuntu.com precise Release.gpg Hit http://ppa.launchpad.net precise Release.gpg Hit http://ppa.launchpad.net precise Release.gpg Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise/main i386 Packages Hit http://us.archive.ubuntu.com precise/restricted i386 Packages Hit http://us.archive.ubuntu.com precise/universe i386 Packages Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages Hit http://us.archive.ubuntu.com precise/main TranslationIndex Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex Hit http://us.archive.ubuntu.com precise/universe TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/main Sources Hit http://us.archive.ubuntu.com precise-updates/restricted Sources Hit http://us.archive.ubuntu.com precise-updates/universe Sources Hit http://us.archive.ubuntu.com precise-updates/multiverse Sources Hit http://us.archive.ubuntu.com precise-updates/main amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/main i386 Packages Hit http://security.ubuntu.com precise-security Release Hit http://us.archive.ubuntu.com precise-updates/restricted i386 Packages Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages Hit http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex Hit http://archive.canonical.com precise Release Hit http://ppa.launchpad.net precise Release.gpg Hit http://extras.ubuntu.com precise Release Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/main Sources Hit http://us.archive.ubuntu.com precise-backports/restricted Sources Hit http://us.archive.ubuntu.com precise-backports/universe Sources Hit http://us.archive.ubuntu.com precise-backports/multiverse Sources Hit http://us.archive.ubuntu.com precise-backports/main amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/universe amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex Hit http://ppa.launchpad.net precise Release.gpg Hit http://ppa.launchpad.net precise Release Hit http://security.ubuntu.com precise-security/main Sources Hit http://archive.canonical.com precise/partner Sources Hit http://extras.ubuntu.com precise/main Sources Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex Hit http://us.archive.ubuntu.com precise/main Translation-en Hit http://us.archive.ubuntu.com precise/multiverse Translation-en Hit http://us.archive.ubuntu.com precise/restricted Translation-en Hit http://us.archive.ubuntu.com precise/universe Translation-en Hit http://us.archive.ubuntu.com precise-updates/main Translation-en Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en Hit http://ppa.launchpad.net precise Release Hit http://security.ubuntu.com precise-security/restricted Sources Hit http://security.ubuntu.com precise-security/universe Sources Hit http://security.ubuntu.com precise-security/multiverse Sources Hit http://security.ubuntu.com precise-security/main amd64 Packages Hit http://security.ubuntu.com precise-security/restricted amd64 Packages Hit http://security.ubuntu.com precise-security/universe amd64 Packages Hit http://security.ubuntu.com precise-security/multiverse amd64 Packages Hit http://security.ubuntu.com precise-security/main i386 Packages Hit http://security.ubuntu.com precise-security/restricted i386 Packages Hit http://security.ubuntu.com precise-security/universe i386 Packages Hit http://archive.canonical.com precise/partner amd64 Packages Hit http://archive.canonical.com precise/partner i386 Packages Ign http://archive.canonical.com precise/partner TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en Hit http://us.archive.ubuntu.com precise-backports/main Translation-en Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en Hit http://extras.ubuntu.com precise/main amd64 Packages Hit http://extras.ubuntu.com precise/main i386 Packages Ign http://extras.ubuntu.com precise/main TranslationIndex Ign http://download.virtualbox.org precise/contrib Translation-en_US Ign http://download.virtualbox.org precise/contrib Translation-en Hit http://ppa.launchpad.net precise Release Hit http://ppa.launchpad.net precise Release Hit http://security.ubuntu.com precise-security/multiverse i386 Packages Hit http://ppa.launchpad.net precise/main Sources Hit http://security.ubuntu.com precise-security/main TranslationIndex Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex Hit http://security.ubuntu.com precise-security/restricted TranslationIndex Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://security.ubuntu.com precise-security/universe TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://security.ubuntu.com precise-security/main Translation-en Hit http://security.ubuntu.com precise-security/multiverse Translation-en Hit http://security.ubuntu.com precise-security/restricted Translation-en Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Ign http://archive.getdeb.net precise-getdeb InRelease Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://security.ubuntu.com precise-security/universe Translation-en Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Ign http://archive.canonical.com precise/partner Translation-en_US Ign http://extras.ubuntu.com precise/main Translation-en_US Hit http://archive.getdeb.net precise-getdeb Release.gpg Ign http://archive.canonical.com precise/partner Translation-en Ign http://extras.ubuntu.com precise/main Translation-en Hit http://archive.getdeb.net precise-getdeb Release Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Hit http://archive.getdeb.net precise-getdeb/apps amd64 Packages Hit http://archive.getdeb.net precise-getdeb/games amd64 Packages Hit http://archive.getdeb.net precise-getdeb/apps i386 Packages Hit http://archive.getdeb.net precise-getdeb/games i386 Packages Ign http://archive.getdeb.net precise-getdeb/apps TranslationIndex Ign http://archive.getdeb.net precise-getdeb/games TranslationIndex Ign http://archive.getdeb.net precise-getdeb/apps Translation-en_US Ign http://archive.getdeb.net precise-getdeb/apps Translation-en Ign http://archive.getdeb.net precise-getdeb/games Translation-en_US Ign http://archive.getdeb.net precise-getdeb/games Translation-en Reading package lists... Done 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. 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. Reading package lists... Done Building dependency tree Reading state information... Done 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. root@dpich-M6400:/home/dpich/Documents# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: libapt-pkg4.12:i386 The following packages will be upgraded: libapt-pkg4.12:i386 1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 1 not fully installed or removed. Need to get 0 B/941 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y E: Internal Error, No file name for libapt-pkg4.12 root@dpich-M6400:/home/dpich/Documents# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: libapt-pkg4.12:i386 The following packages will be upgraded: libapt-pkg4.12:i386 1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 1 not fully installed or removed. Need to get 0 B/941 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y E: Internal Error, No file name for libapt-pkg4.12 root@dpich-M6400:/home/dpich/Documents#
No love:
Code:
root@dpich-M6400:/home/dpich/Documents# wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb --2012-09-27 08:07:53-- http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.92.184, 91.189.92.190 Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.92.184|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-09-27 08:07:53 ERROR 404: Not Found. root@dpich-M6400:/home/dpich/Documents# wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb --2012-09-27 08:22:31-- http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.1ubuntu2_amd64.deb Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.92.190, 91.189.92.184 Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.92.190|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-09-27 08:22:31 ERROR 404: Not Found. root@dpich-M6400:/home/dpich/Documents# wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb --2012-09-27 08:23:23-- http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.92.190, 91.189.92.184 Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.92.190|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 783034 (765K) [application/x-debian-package] Saving to: `libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb' 100%[===============================================================================================================>] 783,034 876K/s in 0.9s 2012-09-27 08:23:24 (876 KB/s) - `libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb' saved [783034/783034] root@dpich-M6400:/home/dpich/Documents# sudo dpkg -i libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb Selecting previously unselected package libapt-pkg4.12. dpkg: regarding libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb containing libapt-pkg4.12: libapt-pkg4.12 breaks apt (<< 0.9.4~) apt (version 0.8.16~exp12ubuntu10.2) is present and installed. dpkg: error processing libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb (--install): installing libapt-pkg4.12 would break apt, and deconfiguration is not permitted (--auto-deconfigure might help) Errors were encountered while processing: libapt-pkg4.12_0.9.7.5ubuntu2_amd64.deb root@dpich-M6400:/home/dpich/Documents# apt-get update ; apt-get upgrade -y ; apt-get dist-upgrade -y ; apt-get autoclean ; apt-get autoremove apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory root@dpich-M6400:/home/dpich/Documents#
Code:
root@dpich-M6400:/home/dpich/Documents# dpkg --force-depends --purge apt dpkg: apt: dependency problems, but removing anyway as you requested: ubuntu-minimal depends on apt. unattended-upgrades depends on apt. tasksel depends on apt (>= 0.6.45ubuntu14). ubuntu-extras-keyring depends on apt. (Reading database ... 308548 files and directories currently installed.) Removing apt ... Purging configuration files for apt ... dpkg: warning: while removing apt, directory '/etc/apt/sources.list.d' not empty so not removed. dpkg: warning: while removing apt, directory '/var/log/apt' not empty so not removed. Processing triggers for man-db ... root@dpich-M6400:/home/dpich/Documents#
Comment