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 <[email protected]>
(via)
I want to keep that ppa as it provides GIMP 2.9.
Question:
How can I install
libpng12-dev
andlibgdal-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
@dsstorefile1 gave the right hint to fix my issue:
The ppa I linked in the question was made for 16.04 when I installed it, but it changed and the the maintainer removed most packages for
xenial
includinglibpng12-0
.So this is how I fixed the situation:
Remove the ppa using
ppa-purge
:Downgrade the
libpng12-0
package to the version from the official repos:Install
libgdal-dev
:I also noticed that following packages are also leftovers from that ppa:
So, I also downgraded/removed these: