Ubuntu 14.04 Installation of libdrm-dev

I am trying to install mesa-common-dev (sudo apt-get install mesa-common-dev), however I get the following message:

mesa-common-dev: Depends: libdrm-dev(>= 2.4.52) but will not be installed. 

So, when I tried to install libdrm-dev, I get the following output:

libdrm-dev: Depends: libdrm2 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed. 
        Depends: libdrm-intel1 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed. 
        Depends: libdrm-radeon1 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed. 
        Depends: libdrm-nouveau2 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed. 

So, I think that this means that alternative packages are installed? However, when I again try to install mesa-common-dev, I get the same error as above...

Can anyone help out a newbie at Ubuntu 14.04? Thanks!


Solution 1:

Look at this line:

Depends: libdrm2 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed.

It says the libdrm-dev to be installed is 2.4.52-1 and requires its dependencies all versioned in 2.4.52-1. But your apt-get only has 2.4.56-1~ubuntu1 available.

Thus, you may try to 'upgrade' the version of libdrm-dev, that is version 2.4.56-1~ubuntu1, as same as its newer dependencies in your case. Now if you google again with keywords libdrm-dev 2.4.56-1~ubuntu1, and within a few clicks, the download link may pop up and wget it like so:

wget http://launchpadlibrarian.net/192227986/libdrm-dev_2.4.56-1~ubuntu1_amd64.deb

Then, make sure the dependencies are installed:

sudo apt-get install libdrm2 libdrm-intel1 libdrm-radeon1 libdrm-nouveau2

Now install the freshly downloaded libdrm-dev:

sudo dpkg -i libdrm-dev_2.4.56-1~ubuntu1_amd64.deb
rm libdrm-dev_2.4.56-1~ubuntu1_amd64.deb

Hope everything goes smoothly!

Solution 2:

I encountered this issue when attempting to install the Mutate launcher on Ubuntu 15.04. The solution that worked for me was to add the xorg-edgers PPA:

sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update
sudo apt-get install <whatever you were trying to install>

I found that by adding this PPA, these dependencies became resolvable when I tried to install the launcher.