LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get dpkg error 5%dpkg (https://www.linuxquestions.org/questions/debian-26/apt-get-dpkg-error-5dpkg-788082/)

akhund_bilal 02-09-2010 03:48 PM

apt-get dpkg error 5%dpkg
 
hi
when i try to install or remove any package i get this error

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)
i'm using ubuntu 9.10
can't install or uninstall or update any thing coz of this error.
pls help me out..

PunksUndead 02-09-2010 05:02 PM

have you tried running sudo dpkg --configure -a

evo2 02-09-2010 09:03 PM

Can you post your /var/lib/dpkg/info/libsox-fmt-alsa.list file?

Code:

cat /var/lib/dpkg/info/libsox-fmt-alsa.list
The last line is probably blank: delete it.

Evo2.

akhund_bilal 02-10-2010 03:36 AM

sorry for late reply
here are the contents of file

Quote:

root@akhund-laptop.akhund-laptop
root@akhund-laptop.akhund-laptop

Received: (nullmailer pid 12500 invoked by uid 0);
Mon, 30 Nov 2009 12:40:32 -0000
From: root@akhund-laptop.akhund-laptop (Cron Daemon)
To: root@akhund-laptop.akhund-laptop
Subject: Cron <root@akhund-laptop> /usr/share/ebox-usersandgroups/slave-sync
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Date: Mon, 30 Nov 2009 17:40:32 +0500
Message-Id: <1259584832.761298.12499.nullmailer@akhund-laptop>

Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Not running within active session) at /usr/share/perl5/EBox/GConfModule.pm line 48.

evo2 02-10-2010 04:04 AM

Wow, somehow that file has become completely corrupted. From the following page

http://packages.ubuntu.com/karmic/i3...-alsa/filelist

I think the contents should be:

Code:

/usr
/usr/lib
/usr/lib/sox
/usr/lib/sox/libsox_fmt_alsa.so
/usr/share
/usr/share/doc
/usr/share/doc/libsox-fmt-alsa
/usr/share/doc/libsox-fmt-alsa/AUTHORS
/usr/share/doc/libsox-fmt-alsa/NEWS.gz
/usr/share/doc/libsox-fmt-alsa/README.gz
/usr/share/doc/libsox-fmt-alsa/changelog.Debian.gz
/usr/share/doc/libsox-fmt-alsa/copyright

So please open up the file with a text editor an replace the contents with what I put in the code block above. Make sure you don't leave any blank lines.
That should fix this problem, but it is possible there will be other problems.

Evo2.

akhund_bilal 02-10-2010 04:15 AM

thanks for quick reply
now the error is changed

Quote:


dpkg: warning: files list file for package `kubuntu-default-settings' missing, assuming package has no files currently installed.


(Reading database ... 5%dpkg: unrecoverable fatal error, aborting:

failed in buffer_read(fd): files list for package `libgtkhex0': Is a directory



akhund_bilal 02-10-2010 04:16 AM

is there a way i can refresh all the conf files, just like a fresh instalation.

evo2 02-10-2010 04:25 AM

Quote:

Originally Posted by akhund_bilal (Post 3858770)
is there a way i can refresh all the conf files, just like a fresh instalation.

If you could reinstall the package, that would work, but your first post indicates that you are unable to do that. Having said that, it is probably worth trying to reinstall it directly with dpkg. Try the following:

Code:

wget http://mirrors.kernel.org/ubuntu/pool/universe/s/sox/libsox-fmt-alsa_14.3.0-1build1_i386.deb
sudo dpkg -i libsox-fmt-alsa_14.3.0-1build1_i386.deb

Evo2.

akhund_bilal 02-10-2010 04:30 AM

please do not mind for my english
evo2 it did not worked

Quote:

sudo dpkg -i libsox-fmt-alsa_14.3.0-1build1_i386.deb
(Reading database ...
dpkg: warning: files list file for package `kubuntu-default-settings' missing, assuming package has no files currently installed.
(Reading database ... 5%dpkg: unrecoverable fatal error, aborting:
failed in buffer_read(fd): files list for package `libgtkhex0': Is a directory

the above error came up with a new file

evo2 02-10-2010 04:32 AM

Sorry I didn't see post #6, only post #7. Looks like kubuntu-default-settings.list has been deleted. You can recreate this file in the same way that you fixed libsox_fmt_als.list. However I'm worried that many of these files are missing or corrupt.
Did something strange happen to your /var directory/partition?

One way to recover these files in bulk is to copy them from another machine that has the same packages installed.

Evo2.

akhund_bilal 02-10-2010 04:37 AM

Quote:

One way to recover these files in bulk is to copy them from another machine that has the same packages installed.
you mean kubuntu default packages or including all the packages i have installed

evo2 02-10-2010 04:43 AM

Quote:

Originally Posted by akhund_bilal (Post 3858789)
you mean kubuntu default packages or including all the packages i have installed

All the packages that you have installed. One way to get that list is:

Code:

dpkg -l | grep ^ii | awk '{ print $2 }'
However that may fail since dpkg is having problems... If the above fails, you should be able to get a list of the packages with the following trick:

Code:

echo  /usr/share/doc/* | tr ' ' '\n' |  cut -f5 -d'/'
Evo2.

akhund_bilal 02-10-2010 04:51 AM

i think i have all messed up ubuntu that will not be possible to install all the packages on the other machine

any other way to do it?

if i reinstall all karmic then can i reinstall all the software in one go which i have installed here

evo2 02-10-2010 05:08 AM

[QUOTE=akhund_bilal;3858800]i think i have all messed up ubuntu that will not be possible to install all the packages on the other machine
[quote]
It should not be that hard. Just get the list of packages using one of the methods I described in in my earlier post: you can put the list directly into a file with:
Code:

dpkg -l | grep ^ii | awk '{ print $2 }' > packages.txt
Then copy that file to the freshly installed machine, and on that fresh machine do:

Code:

sudo apt-get install $(cat packages.txt)
Assuming that works, you now have to copy all the .list files back to the broken machine.

On new machine
Code:

mkdir ~/listfiles
cd /var/lib/dpkg/info/
cp $(for p in $(cat packages.txt) ; do echo $p.list ; done ) ~/listfiles/

Now you have all the file you need to copy in a directory called ~/listfiles/
Next you have to copy them to your broken machine. This could be done with a usb stick or scp depending on your situation.

Quote:

if i reinstall all karmic then can i reinstall all the software in one go which i have installed here
Reinstalling is totally up to you, but you will loose anything you customized and everything in your home directory (unless it is on separate partition). Reinstalling all the packages is easy since you already have a list of them.

Evo2

akhund_bilal 02-10-2010 05:26 AM

thanks i am going for a fresh install both methods takes same time

thanks for your time i have learned many new things
thanks

evo2 02-10-2010 06:13 AM

Quote:

Originally Posted by akhund_bilal (Post 3858849)
thanks i am going for a fresh install both methods takes same time

Ok, good luck!
Quote:

thanks for your time i have learned many new things
No problem.

Cheers,

Evo2.

lattimro 01-16-2022 01:00 PM

Quote:

Originally Posted by evo2 (Post 3858761)
Wow, somehow that file has become completely corrupted. From the following page

http://packages.ubuntu.com/karmic/i3...-alsa/filelist

I think the contents should be:

Code:

/usr
/usr/lib
/usr/lib/sox
/usr/lib/sox/libsox_fmt_alsa.so
/usr/share
/usr/share/doc
/usr/share/doc/libsox-fmt-alsa
/usr/share/doc/libsox-fmt-alsa/AUTHORS
/usr/share/doc/libsox-fmt-alsa/NEWS.gz
/usr/share/doc/libsox-fmt-alsa/README.gz
/usr/share/doc/libsox-fmt-alsa/changelog.Debian.gz
/usr/share/doc/libsox-fmt-alsa/copyright

So please open up the file with a text editor an replace the contents with what I put in the code block above. Make sure you don't leave any blank lines.
That should fix this problem, but it is possible there will be other problems.

Evo2.

Hi evo2,

I read your comments on this thread https://www.linuxquestions.org/quest...-5dpkg-788082/ and I replaced *.list file with proper content. But what about the other files like triggers, shlibs, symbols?

ll /var/lib/dpkg/info|grep libport
-rw-r--r-- 1 root root 321 Oct 23 2020 libportaudio2:amd64.list
-rw-r--r-- 1 root root 311 Jul 30 2020 libportaudio2:amd64.md5sums
-rw-r--r-- 1 root root 29 Jul 30 2020 libportaudio2:amd64.shlibs
-rw-r--r-- 1 root root 2118 Jul 30 2020 libportaudio2:amd64.symbols
-rw-r--r-- 1 root root 72 Jul 30 2020 libportaudio2:amd64.triggers
-rw-r--r--. 1 root root 219 Jan 16 11:24 libportsmf0v5:amd64.list
-rw-r--r--. 1 root root 309 Mar 22 2020 libportsmf0v5:amd64.md5sums
-rw-r--r--. 1 root root 27 Mar 22 2020 libportsmf0v5:amd64.shlibs
-rw-r--r--. 1 root root 72 Mar 22 2020 libportsmf0v5:amd64.triggers

https://www.linuxquestions.org/quest...23#post6318823

Thank you!

evo2 01-16-2022 08:25 PM

Hi,

please start a new thread explaining your problem, then we can try to help.

Evo2.

Quote:

Originally Posted by lattimro (Post 6318863)
Hi evo2,

I read your comments on this thread https://www.linuxquestions.org/quest...-5dpkg-788082/ and I replaced *.list file with proper content. But what about the other files like triggers, shlibs, symbols?

ll /var/lib/dpkg/info|grep libport
-rw-r--r-- 1 root root 321 Oct 23 2020 libportaudio2:amd64.list
-rw-r--r-- 1 root root 311 Jul 30 2020 libportaudio2:amd64.md5sums
-rw-r--r-- 1 root root 29 Jul 30 2020 libportaudio2:amd64.shlibs
-rw-r--r-- 1 root root 2118 Jul 30 2020 libportaudio2:amd64.symbols
-rw-r--r-- 1 root root 72 Jul 30 2020 libportaudio2:amd64.triggers
-rw-r--r--. 1 root root 219 Jan 16 11:24 libportsmf0v5:amd64.list
-rw-r--r--. 1 root root 309 Mar 22 2020 libportsmf0v5:amd64.md5sums
-rw-r--r--. 1 root root 27 Mar 22 2020 libportsmf0v5:amd64.shlibs
-rw-r--r--. 1 root root 72 Mar 22 2020 libportsmf0v5:amd64.triggers

https://www.linuxquestions.org/quest...23#post6318823

Thank you!



All times are GMT -5. The time now is 11:48 PM.