PDA

View Full Version : [ubuntu] dpkg error



vishnumrao
March 31st, 2010, 04:51 AM
Have been running Lucid since alpha 3. Have updated everyday. Haven't had any problems till last week I suddenly started getting error relating to dpkg. Please see screenshot below

http://i39.tinypic.com/2cmvnvd.jpg

Any ideas my fellow ubuntu brothers and sisters?

ArtemNY
March 31st, 2010, 06:07 AM
I got the same error trying to install updates on 9.10

gmargo
March 31st, 2010, 04:36 PM
Look at the file dpkg is complaining about and see if it looks trashed. It should be a list of files and directories.

See /var/lib/dpkg/info/system-config-printer-udev.list

vishnumrao
March 31st, 2010, 07:07 PM
Hi Gmargo,

I found some info on launchpad (https://answers.launchpad.net/ubuntu/+source/update-manager/+question/78863).


I tried the steps mentioned that bug report. Made some progress, but ended up with other errors. As soon as I would rm the problem_package.list file from /var/lib/dpkg/info/ , I would get another problem package. After about 10 sudo rm problem_package.list (10 different problem packages), I decided to sudo rm *.list to remove all .list files. I assumed that the .list files would get re-built or re-downloaded.

I now have a different set of problems. But its some progress. Will update the thread later in the day.

Can you give me your inputs on the removed .list files?

gmargo
March 31st, 2010, 10:00 PM
You didn't comment on what you found in the .list file in question, or the ones that turned up later. They shouldn't have gotten corrupted. Missing maybe but corruption surprised me.

Anyway, since this is Lucid, perhaps the best thing is to just wipe it and install the beta (and the boatload of updates since). Alternatively, in another thread I posted a script that will regenerate the content of /var/lib/dpkg/info/, if you want to try that.

http://ubuntuforums.org/showpost.php?p=8991214&postcount=19

vishnumrao
April 1st, 2010, 02:47 AM
I had already deleted the .list files. Hence I had no way to check the contents of the file.

I downloaded the .pl file and executed it

Here is the output:


vishnumrao@vishnumrao-desktop:~/Downloads$ sudo perl dpkg_info_recover_v1.pl
There are 1781 packages installed.
There are 283 packages already processed.
There are 24 packages ready to process.
There are 1474 packages with no candidate filename.
vishnumrao@vishnumrao-desktop:~/Downloads$

roynoblin
April 1st, 2010, 05:29 AM
i just installed ubuntu and trying to run update manager but i get this:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report.

can anyone tell me what this means and what to do about it
thanks

pastalavista
April 1st, 2010, 05:41 AM
i just installed ubuntu and trying to run update manager but i get this:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report.

can anyone tell me what this means and what to do about it
thanks

It means apt/dpkg failed somehow. Open a terminal (Applications-->Accessories-->Terminal) and enter these commands
sudo apt-get update && sudo apt-get -f install && sudo dpkg --configure -a

gmargo
April 1st, 2010, 01:55 PM
I had already deleted the .list files. Hence I had no way to check the contents of the file.

I downloaded the .pl file and executed it

Here is the output:


vishnumrao@vishnumrao-desktop:~/Downloads$ sudo perl dpkg_info_recover_v1.pl
There are 1781 packages installed.
There are 283 packages already processed.
There are 24 packages ready to process.
There are 1474 packages with no candidate filename.
vishnumrao@vishnumrao-desktop:~/Downloads$


This program does not need 'sudo' - If given the "--download" option, it recovers the files into a temporary directory; the user still has to copy them to the /var/lib/dpkg/info/ directory.

Have you done an 'apt-get update' lately? I think you've found a built-in bug (feature!) in my code. Since I wrote and tested it on a fully up-to-date system, I didn't write the code yet to go out and find old packages. The current incarnation works off of the package lists fetched by 'apt-get update' (aka the latest-and-greatest packages). Let me work on this a little today.

Curious - did you remove all the .list files? According to that output, 283 .list files were found.

roynoblin
April 1st, 2010, 03:29 PM
thanks pastalavista and if someone will tell me how to make a new post i will do so.
i enter what you suggested and got this
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
i can not download anything

roynoblin
April 1st, 2010, 04:17 PM
thanks for showing me Open a terminal (Applications-->Accessories-->Terminal)
from there i did a copy and paste
sudo dpkg --configure -a
it ran a bunch of lines like a dos window and now i was able to do the update
have a video error now but i at least have some idea how to fix it
thanks again:D

vishnumrao
April 1st, 2010, 10:33 PM
This program does not need 'sudo' - If given the "--download" option, it recovers the files into a temporary directory; the user still has to copy them to the /var/lib/dpkg/info/ directory.

Have you done an 'apt-get update' lately? I think you've found a built-in bug (feature!) in my code. Since I wrote and tested it on a fully up-to-date system, I didn't write the code yet to go out and find old packages. The current incarnation works off of the package lists fetched by 'apt-get update' (aka the latest-and-greatest packages). Let me work on this a little today.

Curious - did you remove all the .list files? According to that output, 283 .list files were found.


@gmargo Yes, I deleted all the .list files. After that I ran a update and an upgrade, which seemed to install a few updates, but eventually failed.

You based in Silicon Valley? Curious, where?

Thanks for your time.

vishnumrao
April 2nd, 2010, 05:41 AM
Update: Running update-manager and trying to install updates, does install some updates.

After installing some updates I ran the perl script. This time the number of processed packages went up from 283 to 402. But "There are 24 packages ready to process".


vishnumrao@vishnumrao-desktop:~/Downloads$ perl dpkg_info_recover_v1.pl
There are 1787 packages installed.
There are 402 packages already processed.
There are 24 packages ready to process.
There are 1361 packages with no candidate filename.
vishnumrao@vishnumrao-desktop:~/Downloads$

gmargo
April 2nd, 2010, 05:19 PM
Do you have all of the repositories enabled? I'm having a tough time figuring out how the number of no-candidate-file can be so high. The only packages that show no-candidate-file on my system are the packages for which I've installed a .deb file manually.

vishnumrao
April 2nd, 2010, 06:36 PM
This Lucid install is an upgrade from Karmic (which if I remember correctly, is an upgrade from Jaunty, I could be wrong). Over the past few months, I have enabled and disabled some repos. The upgrade from Karmic to Lucid, disabled some repos, but I have reinstated most like Chromium, Medibuntu, Ubuntu-tweak etc.

An observation: Since I installed a few of the updates, the number of "no candidate filename" has come down from 1474 to 1361. and the number of already processed went up from 283 to 402. So when I install an update for a package, I guess it automatically generates the .list file?

If I sent you a list of the 24 packages that are ready to process, could you send me the necessary info, like the .list files or status entries etc?

Thanks,
Vishnu.

gmargo
April 2nd, 2010, 07:47 PM
If you run the perl script with a --download option, then the 24 packages will be processed and the resultant files will be left in a $HOME/dpkgrecovery/info_add/ directory. You'll have to manually change the ownership and move them to /var/lib/dpkg/info/.

I suspected this might be an upgrade situation. Try this: Add karmic entries to your /etc/apt/sources.list (in addition to the Lucid entries), do an apt-get update, and then run the script again to see if it found more files (on the weak theory that some package are karmic and some lucid?).

gmargo
April 3rd, 2010, 05:28 PM
Ignore what I just said about a "karmic/lucid" mix. Instead I think it's really "lucid/lucid" mix. What I mean by that is that Lucid is currently a moving target, and the packages that were marked "no-candidate-filename" are ones that have been upgraded in Lucid; and the .deb files for the old versions are no longer available. I will come up with a way to generate the info/ files from the newer .debs.

vishnumrao
April 6th, 2010, 07:48 AM
If you run the perl script with a --download option, then the 24 packages will be processed and the resultant files will be left in a $HOME/dpkgrecovery/info_add/ directory. You'll have to manually change the ownership and move them to /var/lib/dpkg/info/.

I ran the perl script with the --download option, and copied all the files from dkpkgrecovery/info_add to the /var/lib/dpkg/info/. But this still does not fix the problem. Running your script now shows:

vishnumrao@vishnumrao-desktop:~/Downloads$ perl dpkg_info_recover_v1.pl
There are 1782 packages installed.
There are 448 packages already processed.
There are 0 packages ready to process.
There are 1334 packages with no candidate filename.
vishnumrao@vishnumrao-desktop:~/Downloads$

Any ideas on how to fix this? Further information: here is the detailed error messages when I do a sudo apt-get upgrade

http://dl.dropbox.com/u/184921/output.txt