1

I am trying to install libvirt 1.2.7 from sources on Ubuntu 12.04 (64bit) LTS. In order to compile libvirt, libdevmapper-dev is required. I a getting following error while installing libdevmapper-dev

# apt-get install libdevmapper-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libdevmapper-dev : Depends: libdevmapper1.02.1 (= 2:1.02.48-4ubuntu7.4) but 2:1.02.90-2ubuntu1 is to be installed
                   Depends: libdevmapper-event1.02.1 (= 2:1.02.48-4ubuntu7.4) but 2:1.02.90-2ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

I have also tried installation with aptitude but it asks for removal several other necessary libraries e.g. liblvm2cmd2.02. Moreover I can not afford to upgrade system to later ubuntu versions.

apt-cache policy gives following output.

# apt-cache policy libdevmapper1.02.1
libdevmapper1.02.1:
  Installed: 2:1.02.90-2ubuntu1
  Candidate: 2:1.02.90-2ubuntu1
  Version table:
 *** 2:1.02.90-2ubuntu1 0
        100 /var/lib/dpkg/status
     2:1.02.48-4ubuntu7.4 0
            500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     2:1.02.48-4ubuntu7 0
            500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

How can I resolve this dependency?

Waqas
  • 819

1 Answers1

0

You have to downgrade some packages and to force the installation of some other packages:

apt-get download dmsetup
sudo dpkg -i --force-all dmsetup
sudo apt-get install libdevmapper1.02.1=2:1.02.48-4ubuntu7.4 libdevmapper-event1.02.1=2:1.02.48-4ubuntu7.4

Probably some other packages as well, but you will know this only when you run the commands.

A.B.
  • 92,125