1

I'm compiling PostGIS 2.5 from source on Ubuntu Server 18.04

The server had no internet connection due to client requirements, so I've been following PostGIS 2.5.1dev Manual, 2.4. Compiling and Install from Source: Detailed Steps ( https://postgis.net/docs/manual-2.5/postgis_installation.html#PGInstall ).

It's required to install (compile from source) the next packages:

  1. Proj4 reprojection library, version 4.9.0 or greater.
  2. GEOS geometry library, version 3.5 or greater.
  3. LibXML2, version 2.5.x or higher.
  4. JSON-C, version 0.9 or higher.
  5. GDAL, version 1.8 or higher.

Everything works fine after typical compiling instructions:

./configure
make
make install 

Then I compile PostGIS again with typical instructions:

./configure
make
make install 

In order to check if everything is working, I connect to my DB:

sudo -u postgres psql postgres
postgres=# \c testdb
testdb=# \CREATE EXTENSION postgis;

And then... PostGIS ERROR: could not load library "/usr/lib/postgresql/10/lib/postgis-2.5.so": libproj.so.13: cannot open shared object file: No such file or directory.

As far as I understand, the problem is with libproj so I've compiled again, but had no success.

Did I miss something?

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Sep 27, 2018 at 0:22

2 Answers 2

1

If you did not install postgis in /usr, then this error is normal.

You need to configure ldconfig to link you compiled libs. You could export LD_LIBRARY_PATH=/opt/postgres or /usr/local (see in the makefile) or you can permanently add a config file in /etc/ld.conf.so.d/ with the path of your libs before calling 'sudo ldconfig'.

The best way is that you find where is this libproj.so; may be you just need a symlink to get postgres to find it.

answered Dec 5, 2018 at 11:28
1
  • Thanks a lot!!! It worked like a charm. Commented Jun 21, 2019 at 8:35
0

I pass you a post, it is in Spanish, but it will be useful to install PostGIS 2.5 in Ubuntu 18.04 LTS post

answered Oct 2, 2018 at 2:12
1
  • Thanks!! Very useful post, it explains a lot about the configuration. Commented Oct 6, 2018 at 0:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.