Upgrade problem, dpkg error & apt-get update leads to error message: libapt-pkg.so.4.12: file too
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi, I get an error whenever I try to open an application using apt or try to install anything & now I want to finding a way to update Lubuntu 12.04 with apt. apt-get update leads to error message: libapt-pkg.so.4.12: file too short. I'm running Lubuntu 12.04 from a DELTACO USB SATA/IDE adapter kit from an USB port. I have tried to repair the file system with the fsck tool. I know that running the ext4 file system without a journal can cause problems. Other than that the system works very well.
From Terminal:
Code:
dmesg | grep EXT4
[ 3.033062] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[ 9.255690] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
Update from Terminal:
Code:
sudo apt-get update
apt-get: error while loading shared libraries: /usr/lib/
Code:
sudo apt-get install <package>
apt-get: error while loading shared libraries: /usr/lib/
Code:
sudo synaptic
synaptic: error while loading shared libraries: /usr/lib/
Code:
sudo update-manager
Traceback (most recent call last):
File "/usr/bin/
from UpdateManager.
File "/usr/lib/
import apt_pkg
ImportError: /usr/lib/
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/
from apport.report import Report
File "/usr/lib/
import apport.fileutils
File "/usr/lib/
from apport.
File "/usr/lib/
import apt
File "/usr/lib/
import apt_pkg
ImportError: /usr/lib/
Original exception was:
Traceback (most recent call last):
File "/usr/bin/
from UpdateManager.
File "/usr/lib/
import apt_pkg
ImportError: /usr/lib/
"fil för kort" which means file too short in Swedish.
I also got: "Ett problem inträffade vid kontroll av uppdateringar." which means: A problem occurred when checking for updates.
Running fsck & e2fsck from Debian 7 "Wheezy" testing, output in Swedish:
Code:
root@debian:/# fsck /dev/sdc1
fsck från util-linux 2.20.1
e2fsck 1.42.4 (12-Jun-2012)
/dev/sdc1 var inte fläckfritt avmonterat, kontroll framtvingad.
Pass 1: Kontrollerar inoder, block och storlekar
Pass 2: Kontrollerar katalogstruktur
Pass 3: Kontrollerar katalogförbindelser
Pass 4: Kontrollerar referensräknare
Pass 5: Kontrollerar gruppsammanfatt
/dev/sdc1: 157422/5431296 filer (0.2% ej sammanhängande), 1632724/21717248 block
Code:
root@debian:/# e2fsck -f /dev/sdc1
e2fsck 1.42.4 (12-Jun-2012)
Pass 1: Kontrollerar inoder, block och storlekar
Pass 2: Kontrollerar katalogstruktur
Pass 3: Kontrollerar katalogförbindelser
Pass 4: Kontrollerar referensräknare
Pass 5: Kontrollerar gruppsammanfatt
/dev/sdc1: 157422/5431296 filer (0.2% ej sammanhängande), 1632724/21717248 block
Running from Terminal in Lubuntu 12.04, output in Swedish:
Code:
sudo dpkg -i libapt-
dpkg: fel: läser paketinfofilen "/var/lib/
Source: http://
Code:
sudo dpkg -i libapt-
dpkg: fel: läser paketinfofilen "/var/lib/
Source: http://
Original source by Lyfang (aka Christopher Forster): http://
[SOLVED] Extract libapt- pkg4.12_ 0.8.16~ exp12ubuntu10. 2_i386. deb with File Roller. Backup all files mentioned with the cp command. In my case only libapt-pkg.so.4.12.
Or locate files with PCManFM as a superuser to backup file(s) and backup file(s):
Run from (LX)Terminal:
gksudo pcmanfm
Copy both libapt-pkg.so.4.12 & libapt- pkg.so. 4.12.0 to the directory /usr/lib/ i386-linux- gnu i.e.: i386-linux- gnu/libapt- pkg.so. 4.12 i386-linux- gnu/libapt- pkg.so. 4.12.0
/usr/lib/
/usr/lib/
The apt-get command now works great!