LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get dpkg error: files list file ... missing final newline (https://www.linuxquestions.org/questions/debian-26/apt-get-dpkg-error-files-list-file-missing-final-newline-271118/)

PBSchmidt 12-28-2004 08:26 AM

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.

Any help very much appreciated, I am desperate:cry: !

Yours, Peter

PBSchmidt 12-29-2004 12:17 PM

Problem resolved!
 
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!:D

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.

Cheers,

Peter

linuxdojo 08-13-2008 04:11 PM

Bingo!
 
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.

Thanks guy
Tnt

MALDATA 05-25-2009 10:23 AM

Still works...
 
Had the same problem with a fresh Debian install. I got the error saying

Code:

file list file for package `gcc-4.3' is missing final newline
Sure enough, /var/lib/dpkg/info/gcc-4.3.list had a whole bunch of garbage in it. I deleted it, then did

Code:

apt-get install gcc-4.3 --reinstall
and now everything's ok again.

Thanks for posting your solutions!

suki 09-29-2009 08:05 PM

Quote:

Originally Posted by MALDATA (Post 3552127)
Code:

apt-get install gcc-4.3 --reinstall

Yeah, that reinstall command is important. I started by just deleting the corrupt list files and then started getting "serious warnings" from apt-get.

reinstalling those packages fixed everything for me.

akhund_bilal 02-09-2010 03:43 PM

hi
i tried all the above methods but ....
here is the error which i get when i try to install or remove any package


Quote:

(Reading database ... 5%dpkg: unrecoverable fatal error, aborting:
files list file for package `libsox-fmt-alsa' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

Phiebie 02-11-2010 11:11 AM

Quote:

Originally Posted by akhund_bilal (Post 3858256)
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.

Good luck from now on.

evo2 02-11-2010 09:03 PM

Please have a look at this thread:
http://www.linuxquestions.org/questi...-5dpkg-788082/

Evo2.

hsbakhtiari 12-26-2010 03:03 AM

apt-dpkg error
 
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

nkl 12-11-2012 05:14 AM

Thanks!!
 
thank you guys!! (specially Justin and Peter)
Was stuck in this problem for around 8 months!!

cjgoodwin 10-08-2014 09:57 AM

@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.

pmendl 02-09-2016 11:52 PM

Many thanks
 
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 :o .

rvca 02-07-2017 10:41 PM

A post that keeps on giving.
 
@PBSchmidt kudos, it turns out it was also a corrupted `.list` file in my case.

jaymebc 04-29-2023 05:55 PM

Same problem here in 2023
 
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'.

It has worked like magic!

Thank you all!


All times are GMT -5. The time now is 02:49 PM.