list file for package missing final newline
Fernan Aguero
fernan.aguero at gmail.com
Fri Jan 12 15:18:27 UTC 2007
Seems like I'm being warnocked[1] so I reply to myself,
just for the archives.
[1] http://en.wikipedia.org/wiki/Warnock's_Dilemma
+----[ To ubuntu-users at lists.ubuntu.com <fernan.aguero at gmail.com> (11.Jan.2007 19:13):
|
| Hi,
|
| I'm having a problem since yesterday where I can't install
| any package on my Ubuntu Edgy.
|
| The error message is always something like:
|
| E: /var/cache/apt/archives/libid3-3.8.3c2a_3.8.3-5_i386.deb:
| files list file for package `libgtk1.2' is missing final
| newline
|
| This happened with both the latest security updates
| (linux-restricted-modules-common), and with other packages I
| tried to install.
The problem was a bad shutdown, and fsck did not help ...
so the list file for libgtk1.2 was corrupted.
[snipped]
| I read elsewhere that I could edit the plist in the package
| to add this missing newline, but I'm a new Debian/Ubuntu
| user, and I don't know my way about unpacking, editing, and
| either installing from the unpacked package or repackaging
| and installing from there ... the .deb file it's a binary
| file (can't edit with vim), but the less(1) included in
| ubuntu seems to be smart (or is a wrapper) and shows me the
| content of the file ... is this a .tgz or similar kind of
| archive in a different disguise?
The bad list file was not the one inside the package,
but the one that I had in my system.
If you're new to Debian/Ubuntu and are still finding your
way around, here you go:
1. The package list files are in /var/lib/dpkg/info
In my case /var/lib/dpkg/info/libgtk1.2.list was corrupted
(its contents were binary cruft).
So the best way to go about this is to
2. Manually reinstall the affected package
# move the info dir containing corrupted data out of the
# way, and create a new 'info' dir
cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
# reinstall the affected package, in my case this was
sudo apt-get --reinstall install libgtk1.2
# this will print lots of warnings about missing list
# files for the dependencies, which is obvious.
# now move the newly generated files in 'info/' to the
# 'info.bak/' directory containing info for all packages
# this will replace the information for the package
# we just installed
sudo mv info/* info.bak/
# and now get things back to where they were
sudo rm -rf info
sudo mv info.bak info
Finally, to answer my own questions about debian/ubuntu
packages (which in the end turned out to be unrelated to the
problem at hand)
3. Debian/Ubuntu packages are ar(1) archives
but file(1) won't tell you about this, at least not in
Ubuntu (it's a secret, don't tell anyone).
You can unpack a .deb like this:
ar -x package.deb
| Thanks for any tip,
|
| Fernan
|
+----]
Fernan
More information about the ubuntu-users
mailing list