I'm trying to install
sudo apt-get install libgdal-dev
But it has unmet dependencies:
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
dpkg -s libpng12-0 | grep ^Maintainer Maintainer: Otto Meier <email@example.com>
I want to keep that ppa as it provides GIMP 2.9.
How can I install
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 ?
What I tried:
apt download libpng12-dev sudo dpkg --ignore-depends=libpng12-0 -i libpng12-dev_1.2.54-1ubuntu1.1_amd64.deb
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