libxml2 dependency problem

Asked by Kent McNaughton

I'm running 12.04 Precise. 'uname -a' gives this:
Linux puka 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:26:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I was downloading 'pandora-build' from the Software Center and got a message saying I had a libxml2-dev dependency problem.

The system offered to repair it, but failed. It gave me this:

"The package system is broken

"Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f"

I removed a recently added third party repository (openscad). There were no others in /etc/apt/sources.list

The 'Details' of the package manaager said this:
"The following packages have unmet dependencies:

"libglade2-dev: Depends: libglade2-0 (= 1:2.6.4-1ubuntu1.1) but 1:2.6.4-1ubuntu1.1 is installed
               Depends: libxml2-dev but it is not installed

'sudo apt-get -f install' resulted in:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libxml2-dev
The following NEW packages will be installed:
  libxml2-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/805 kB of archives.
After this operation, 2,759 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 551905 files and directories currently installed.)
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb (--unpack):
 './usr/bin/xml2-config' is different from the same file on the system
Errors were encountered while processing:
 /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

'sudo apt-get purge libxml2-dev' told me:

Package libxml2-dev is not installed, so not removed

Running 'sudo apt-get install libxml2-dev' yielded this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxml2-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/805 kB of archives.
After this operation, 2,759 kB of additional disk space will be used.
(Reading database ... 551905 files and directories currently installed.)
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb (--unpack):
 './usr/bin/xml2-config' is different from the same file on the system
Errors were encountered while processing:
 /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Mmmmm How to recover?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu libxml2 Edit question
Assignee:
No assignee Edit question
Solved by:
Kent McNaughton
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

what is the output of

dpkg -l libxml2-dev libxml2-dev:i386

sudo apt-get install --reinstall libxml2-dev:i386 libxml2-dev

Revision history for this message
Kent McNaughton (kent-panamanow) said :
#2

Thanks for responding Manfred. Here are the outputs.

dpkg -l libxml2-dev libxml2-dev:i386
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
in libxml2-dev <none> (no description available)
ii libxml2-dev:i3 2.7.8.dfsg-5.1 Development files for the GNOME XML library

sudo apt-get install --reinstall libxml2-dev:i386 libxml2-dev
[sudo] password for kent:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxml2-dev
0 upgraded, 1 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 762 kB/1,567 kB of archives.
After this operation, 2,759 kB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu/ precise-security/main libxml2-dev i386 2.7.8.dfsg-5.1ubuntu4.11 [762 kB]
Fetched 762 kB in 4s (177 kB/s)
(Reading database ... 551905 files and directories currently installed.)
Preparing to replace libxml2-dev:i386 2.7.8.dfsg-5.1ubuntu4.11 (using .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_i386.deb) ...
Unpacking replacement libxml2-dev:i386 ...
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb (--unpack):
 './usr/bin/xml2-config' is different from the same file on the system
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

This seems to be Bug #1215751

try again with

sudo apt-get install libxml2-dev:i386- libxml2-dev

Revision history for this message
Kent McNaughton (kent-panamanow) said :
#4

OK. Running the install. It's showing:

sudo apt-get install libxml2-dev:i386- libxml2-dev
[sudo] password for kent:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libxml2:i386
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libxml2-dev:i386
The following NEW packages will be installed:
  libxml2-dev
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/805 kB of archives.
After this operation, 549 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 551903 files and directories currently installed.)
Removing libxml2-dev:i386 ...
Processing triggers for man-db ...
(Reading database ... 551839 files and directories currently installed.)
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_amd64.deb) ...
Processing triggers for man-db ...
Setting up libxml2-dev (2.7.8.dfsg-5.1ubuntu4.11) ...
Setting up libglade2-dev (1:2.6.4-1ubuntu1.1) ...

Looks like no errors!

Thank you Manfred!