LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-28-2004, 08:26 AM   #1
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Rep: Reputation: 15
Unhappy 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 !

Yours, Peter
 
Old 12-29-2004, 12:17 PM   #2
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Original Poster
Rep: Reputation: 15
Thumbs up 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!

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
 
Old 08-13-2008, 04:11 PM   #3
linuxdojo
LQ Newbie
 
Registered: Nov 2003
Location: Silicon Valley
Distribution: Debian, Kubuntu and Android
Posts: 4

Rep: Reputation: 1
Lightbulb 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
 
Old 05-25-2009, 10:23 AM   #4
MALDATA
Member
 
Registered: Mar 2005
Posts: 157

Rep: Reputation: 19
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!
 
Old 09-29-2009, 08:05 PM   #5
suki
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by MALDATA View Post
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.
 
Old 02-09-2010, 03:43 PM   #6
akhund_bilal
LQ Newbie
 
Registered: Sep 2008
Posts: 12

Rep: Reputation: 0
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)
 
Old 02-11-2010, 11:11 AM   #7
Phiebie
Member
 
Registered: Oct 2004
Location: Austria
Distribution: Debian testing
Posts: 114

Rep: Reputation: 17
Quote:
Originally Posted by akhund_bilal View Post
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.
 
Old 02-11-2010, 09:03 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

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

Evo2.
 
Old 12-26-2010, 03:03 AM   #9
hsbakhtiari
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Rep: Reputation: 0
Unhappy 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
 
Old 12-11-2012, 05:14 AM   #10
nkl
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
Thanks!!

thank you guys!! (specially Justin and Peter)
Was stuck in this problem for around 8 months!!
 
Old 10-08-2014, 09:57 AM   #11
cjgoodwin
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
Thumbs up

@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.
 
Old 02-09-2016, 11:52 PM   #12
pmendl
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
Thumbs up 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 .
 
Old 02-07-2017, 10:41 PM   #13
rvca
LQ Newbie
 
Registered: Dec 2005
Location: Vancouver
Distribution: Debian/Ubuntu
Posts: 29

Rep: Reputation: 15
A post that keeps on giving.

@PBSchmidt kudos, it turns out it was also a corrupted `.list` file in my case.
 
Old 04-29-2023, 05:55 PM   #14
jaymebc
LQ Newbie
 
Registered: Apr 2023
Posts: 1

Rep: Reputation: 0
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get / dpkg error caused by aspell amon Debian 1 04-14-2005 03:09 PM
DPKG & "files list file for package `pkg-config' contains empty filename" error :( Angelus Debian 2 04-02-2005 07:34 AM
warning: no final newline at the end of /etc/fstab Jeebizz Slackware 2 10-12-2004 02:19 PM
apt-get upgrade error in dpkg (--unpack) for gcc,g++ forgox Debian 4 08-29-2004 04:22 PM
[mntent]:warning: no final newline at the end of /etc/fstab Rodcl Linux - Hardware 4 08-25-2002 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration