apt-get dpkg error: files list file ... missing final newline
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
apt-get dpkg error: files list file ... missing final newline
Hello there,
I think I screwed up my debian sarge on my laptop somehow - trying to install *anything* via apt-get results in:
Code:
flunder:/home/pbschmidt# apt-get install smbfs
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
samba-common smbclient
The following packages will be upgraded:
samba-common smbclient smbfs
3 upgraded, 0 newly installed, 0 to remove and 184 not upgraded.
Need to get 0B/4790kB of archives.
After unpacking 28,7kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... dpkg: error processing /var/cache/apt/archives/smbclient_3.0.10-1_i386.deb (--unpack):
files list file for package `smbfs' is missing final newline
Errors were encountered while processing:
/var/cache/apt/archives/smbclient_3.0.10-1_i386.deb
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
(BTW, it is always smbfs - I recently tried even a dist-upgrade, guess what happened after retriefing MBs of data?)
I did a
Code:
apt-get clean
apt-get update
and it keeps telling me that
Code:
files list file for package `smbfs' is missing final newline
for *everything* I tried to apt-get install (initially I tried to add sudo I somehow forgot in the base install).
Does anyone have a clue what this might be? As far as I can read, it seems to be the contents of the newly apt-got smbfs deb Package, so if I edit that, it will be messed again every time I apt-get update it.
Well, with a big help from #debian at freenode, I found the solution (thanks justin!!):
the file /var/lib/dpkg/info/smbfs.list was corrupted, it was all binary crap. Dunno how this could happen, but it was. So justin advised me to delete the file (actually, I mv'd it) - and, voila, apt warned me that the files list could not be found for smbfs, but at least I could apt-get remove smbfs --purge and install it again (apt-get install smbfs) - that took the biscuit!
So big cheers to justin!
If someone with a similar problem comes across this therad, I wanted to give the solution here. It was rather easy to imagine, but I could not figure out where the file might reside, so I hope this may guide another desperate linuxer to get his dpkg work again.
Give the man a prize. Just solved my issue by sharing that little bit. Not a newbie either just never seen this error before and well googling around i found your post and now i am back to getting stuff done thanks to Justin AND Peter.
hi
i tried all the above methods but ....
here is the error which i get when i try to install or remove any package
Debian for already 2 years - give or take a few months - strongly recommends to use "aptitude" as the preferred sole method of maintaining packages, updating or upgrading.
Why, amongst a large bunch of other users, don't you stick to this? But try and try and try all other kinds of methods till your/their system is corrupt and sticks in the mud.
No, no excuse for the pure CLI-freaks is there! Aptitude runs also perfectly outside any GUI.
hi
i'm new in linux . i've installed knoppix linux version 6.2.1 in my system that has has a graphical interface (compize) . i want to install gnome in my system cuz it has not any X login screen and i tried to do debian guide to do that but i get dpkg error in my system .so i decided to do apt-get -f upgrade to upgrade my system but after downloading 1.5 GB file again i received dpkg erro and it's says use "apt-get -f install" to correct this problem . unfortunately when i want to do it too i get this problem again :
(Reading database ... 40%
dpkg: warning: files list file for package `cloop-utils' missing, assuming package has no files currently installed.
(Reading database ... 70%
dpkg: warning: files list file for package `dpkg' missing, assuming package has no files currently installed.
(Reading database ... 407694 files and directories currently installed.)
Unpacking libkrb53 (from .../libkrb53_1.6.dfsg.4~beta1-5lenny6_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libkrb53_1.6.dfsg.4~beta1-5lenny6_i386.deb (--unpack):
trying to overwrite '/usr/lib/libkrb5.so.3.3', which is also in package libkrb5-3 0:1.8+dfsg~alpha1-5
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libkrb53_1.6.dfsg.4~beta1-5lenny6_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
is anybody know what should i do to get deal with this problem
before thanks for your response
@PBSchmidt - awesome, thanks for posting your fix.
I had the problem with libusb, I've just removed the package files and reinstalled it (perhaps could have just reinstalled it actually) with apt-get --reinstall install libusb-0.x.x.
Many thanks to @PBSchmidt. I assumed the file deletion will be sufficient (with reinstall, off course) but for nothing could find the correct path to it .
Same problem here in 2023 using Proxmox, but here with "bc" and "libencode-locale-perl" packages. And, as said before, the .list file from both packages looked corrupted.
So I've changed both from .list to .list2 and run 'apt update' and 'apt upgrade'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.