I am not able to install postgis.

$ sudo apt-get install postgresql-10-postgis-2.4 libgdal20 libhdf5-100             
libnetcdf13 libgfortran4
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:
 libgfortran4 : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but         
 7.3.0-27ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

This is what it says finally.


It seems that bionic updates is killing your installation: https://packages.ubuntu.com/search?keywords=gcc-7-base&searchon=names

However, libgfortran4 should have an update in bionic updates as well: https://packages.ubuntu.com/search?keywords=libgfortran4&searchon=names

My Linux Mint 19 already has libgfortran4 version 7.3.0-27ubuntu~18.04

Try apt-cache policy libgfortran4 to see which version can be installed on your system.

As an alternative, try the ubuntugis ppa which has postgresql-10-postgis-2.5. I have not checked for its dependencies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.