I just installed PostGIS 2.4.0alpha from source by following osgeo instructions on Ubuntu 16.04.

After installation, PostGIS seems to work. However, command line tools that are supposed to come with PostGIS are not installed.

For example, shp2pgsql is missing after sudo make install.

$ shp2pgsql
The program 'shp2pgsql' is currently not installed. You can install it by typing:
sudo apt install postgis

(similarly raster2pgsql is also missing).

Looking into the postgis-2.4.0alpha/loader folder, the executables shp2pgsql and pgsql2shp are present.

What steps do I need to do beyond sudo make install to install the command line tools such as shp2pgsql and raster2pgsql?

  • It is probably just a matter of adding a symlink or adding the psql/bin directory to your PATH in bashrc or similar. I install from packages these days and on my Ubuntu 16.04 box, it is in /usr/bin/shp2pgsql. However, in the old days, when I enjoyed breaking my system on a more regular basis :-), I recall that such things used to appear in <path_to>/psql/bin/. Also, have you run ldconfig? I often found that would solve a lot of post build linking issues. – John Powell Aug 25 '17 at 8:46

It turns out that this is a PATH issue as pointed out in @JohnPowellakaBarça comment. And I solved the problem by adding /usr/lib/postgresql/9.6/bin to system path.

Somehow make install in PostGIS 2.4.0alpha installed the binaries to the above folder but didn't install the symlinks to /usr/bin.

  • 1
    Glad it worked. These things can be a bit painful (though not as painful as using Windows, boviously :-)) – John Powell Aug 31 '17 at 5:50

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.