Ubuntu upgrade issues - E: Sub-process /usr/bin/dpkg returned an error code (2)

7 posts / 0 new
Last post
#1 Tue, 07/09/2013 - 08:11
chiareu

Ubuntu upgrade issues - E: Sub-process /usr/bin/dpkg returned an error code (2)

Hi, I encountered the problem few weeks ago. First I didn't pay to much attention and I let the server running, but for now, there is a lot of upgrades to be fixed and I'm stuck.

If I try to upgrade something the process will ended with the message below. Even the autoremove.

(Reading database ... dpkg: unrecoverable fatal error, aborting: reading files list for package 'libhtml-parser-perl': Is a directory E: Sub-process /usr/bin/dpkg returned an error code (2)

thanks

ps. tried to run from webmin and ssh command-line both. the same error. Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-48-generic x86_64)

Tue, 07/09/2013 - 10:18
andreychek

Howdy,

Is that libhtml-parser-perl package the only one that's causing an error?

If so, you could always try removing that if you don't need it. Or if you do need it, you could try reinstalling it later.

To remove it, you can run this command:

apt-get remove libhtml-parser-perl

Wed, 07/10/2013 - 02:19
chiareu

Hi andreychek, tried and the same problem :|

root@primus:~# apt-get remove libhtml-parser-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libxml-libxml-perl
The following packages will be REMOVED:
  libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tree-perl libhttp-cookies-perl
  libhttp-daemon-perl libhttp-message-perl libhttp-negotiate-perl liblwp-protocol-https-perl libwww-perl
  libxml-parser-perl libxml-sax-expat-perl spamassassin
The following NEW packages will be installed:
  libxml-libxml-perl
0 upgraded, 1 newly installed, 13 to remove and 3 not upgraded.
Need to get 0 B/389 kB of archives.
After this operation, 5,155 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 60%dpkg: unrecoverable fatal error, aborting:
reading files list for package 'libhtml-parser-perl': Is a directory
E: Sub-process /usr/bin/dpkg returned an error code (2)

And from Webmin update, I tried to update the mysql, the result is bellow

Now updating mysql-server-5.5 ..
Installing package(s) with command apt-get -y install mysql-server-5.5 ..
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libterm-readkey-perl mysql-client-5.5 mysql-server-core-5.5
Suggested packages:
  tinyca
The following NEW packages will be installed:
  libterm-readkey-perl
The following packages will be upgraded:
  mysql-client-5.5 mysql-server-5.5 mysql-server-core-5.5
Preconfiguring packages ...
3 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/23.3 MB of archives.
After this operation, 119 kB of additional disk space will be used.
Selecting previously unselected package libterm-readkey-perl.
(Reading database ... dpkg: unrecoverable fatal error, aborting:
reading files list for package 'libhtml-parser-perl': Is a directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
.. install failed!
Wed, 07/10/2013 - 07:59
andreychek

Okay, so the problem you're having is that the libhtml-parser-perl package is somehow damaged, and that's preventing you from installing new packages, as well as from removing that package.

Googling that issue, the only other place I saw the specific problem you're having is from this Romanian user posting in the Ubuntu forums (with no response):

http://forum.ubuntu.ro/viewtopic.php?pid=172382

So it sounds like you're seeing something unusual...

Did any unusual events occur around the time this all began occurring?

To resolve that though, you may need to force remove that particular package.

An example of how to do that can be seen here:

http://ubuntuforums.org/showthread.php?t=1597294

Wed, 07/10/2013 - 08:28
chiareu

Yep, the above posted tread from Romanian Ubuntu forum is mine :) unfortunately with no answer.

The issue appear when I want to update to mysql 5.5 version. That was when the updates was listed on my webmin console a little time ago, didn't make the update and leave it so. But meantime 28 updates are released and I start working around to solve it.

Before that, nothing to be mentioned, only webmin update who was smooth and clean.

I'll try to force remove the package and I'll post here the results.

Thank's

Operating system Ubuntu Linux 12.04.1 Webmin version 1.631
Virtualmin version 4.01.gpl GPL Theme version 8.7 Kernel and CPU Linux 3.2.0-48-generic on x86_64

Wed, 07/10/2013 - 08:40
chiareu

not working.

root@primus:~# dpkg --force-all -P libhtml-parser-perl
dpkg: libhtml-parser-perl: dependency problems, but removing anyway as you requested:
libwww-perl depends on libhtml-parser-perl.
spamassassin depends on libhtml-parser-perl (>= 3.43).
libhtml-tree-perl depends on libhtml-parser-perl.
libhttp-message-perl depends on libhtml-parser-perl.
libhtml-form-perl depends on libhtml-parser-perl.
(Reading database ... 60%dpkg: unrecoverable fatal error, aborting:
reading files list for package 'libhtml-parser-perl': Is a directory

tried:

dpkg --configure -a
apt-get autoclean
apt-get autoremove
apt-get clean
apt-get update
apt-get upgrade

ended with same error: Preconfiguring packages ... (Reading database ... 60%dpkg: unrecoverable fatal error, aborting: reading files list for package 'libhtml-parser-perl': Is a directory E: Sub-process /usr/bin/dpkg returned an error code (2)

Tue, 01/07/2014 - 15:27
cv98

Hi guys I dont know what the problem is but i know that it is not caused by packages you install. I have debian on my android phone and i connect to it using an internal ssh. I didnt install any packages. [apt-get install reaver] was the first attempt to install or change something. It returned "E: Sub-process /ussr/bin/dpkg returned an error code (2)" which we are, unfortunaly, familiar with. You can consider me a noob (compared to everything i know i am a wizard...) so i dont know what dpkg does, only that it is important (i guess). I didnt download a debian.img, i downloaded an app which installs linux by downloading all components and sort of melting them together in a new debian.img so it probably is not a error in the downloaded files. You can find the problem somewhere in the dpkg files i think. If someone knows something i would appreciate it if he posted it, the creator of this post probably wants his problem solved (and maybe i can do something with it to). Thanks

Topic locked