Sunday, January 24, 2016

16.04 - How to install packages when dependency is already installed from PPA?

I'm trying to install libgdal-dev:



sudo apt-get install libgdal-dev


But it has unmet dependencies: Depends: libpng-dev




Which itself cannot be installed because:



libpng12-dev : Depends: libpng12-0 (= 1.2.54-1ubuntu1.1) but 1.2.54-5x0~ppa is to be installed


This package is installed from a ppa:



dpkg -s libpng12-0 | grep ^Maintainer
Maintainer: Otto Meier



(via)



I want to keep that ppa as it provides GIMP 2.9.






Question:





  • How can I install libpng12-dev and libgdal-dev (maybe ignoring or manually changing certain dependencies) ?


  • or generally: How to install packages when dependency is already installed in another version from PPA ?







(Hint: Installing GIMP with Snap is neither preferred nor possible)










What I tried:



I installed libpng12-dev ignoring libpng12-0 dependecy
(via):



apt download libpng12-dev
sudo dpkg --ignore-depends=libpng12-0 -i libpng12-dev_1.2.54-1ubuntu1.1_amd64.deb



This worked.
Also, libgdal-dev still had unmnet dependencies, so I did the same:



sudo apt install libgdal-dev
sudo dpkg --ignore-depends=libpng12-0 -i libgdal-dev_2.2.2+dfsg-1~xenial1_amd64.deb #png12-dev_1.2.54-1ubuntu1.1_amd64.deb

dpkg: dependency problems prevent configuration of libgdal-dev:
libgdal-dev depends on libarmadillo-dev; however:
Package libarmadillo-dev is not installed.
libgdal-dev depends on libcurl4-gnutls-dev | libcurl-ssl-dev; however:

Package libcurl4-gnutls-dev is not installed.
Package libcurl-ssl-dev is not installed.
libgdal-dev depends on libdap-dev; however:
Package libdap-dev is not installed.
libgdal-dev depends on libepsilon-dev; however:
Package libepsilon-dev is not installed.
libgdal-dev depends on libfreexl-dev; however:
Package libfreexl-dev is not installed.
libgdal-dev depends on libfyba-dev; however:
Package libfyba-dev is not installed.

libgdal-dev depends on libgeos-dev; however:
Package libgeos-dev is not installed.
libgdal-dev depends on libgeotiff-dev; however:
Package libgeotiff-dev is not installed.
libgdal-dev depends on libgif-dev; however:
Package libgif-dev is not installed.
libgdal-dev depends on libhdf4-alt-dev; however:
Package libhdf4-alt-dev is not installed



So, I stopped here and fixed the situation again:



sudo dpkg -r libgdal-dev
sudo dpkg -r libpng12-dev

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...