0

Following the indications found here. I'm trying to install Tile Server in Ubuntu 22.04

but I'm getting this error:

raphy@pc:~$ sudo -u _renderd osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ./OSM_src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ./OSM_src/openstreetmap-carto/openstreetmap-carto.style ./OSM_src/data/azerbaijan-latest.osm.pbf
osm2pgsql: error while loading shared libraries: libboost_filesystem.so.1.71.0: cannot open shared object file: No such file or directory

The libboost library present is 1.74.0:

raphy@pc:~$ sudo apt install libboost-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libboost-dev is already the newest version (1.74.0.3ubuntu7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

raphy@pc:/usr/lib/x86_64-linux-gnu$ ls -lah | grep libboost_filesystem.so
lrwxrwxrwx   1 root root    29 mar 16  2022 libboost_filesystem.so -> libboost_filesystem.so.1.74.0
-rw-r--r--   1 root root  123K mar 16  2022 libboost_filesystem.so.1.74.0

Following the indications found here: How to set LD_LIBRARY_PATH permanently? I've set in .bashrc file:

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/libboost_filesystem.so"

And, following the indications found here: https://serverfault.com/questions/201709/how-to-set-ld-library-path-in-ubuntu I've set /etc/ld.so.conf.d/libboost.conf as :

/usr/lib/x86_64-linux-gnu/libboost_filesystem.so

And then

sudo ldconfig

But still get the error:

osm2pgsql: error while loading shared libraries: libboost_filesystem.so.1.71.0: cannot open shared object file: No such file or directory

How to solve the problem?

1 Answer 1

3

This error message indicates that the shared library libboost_filesystem.so.1.71.0 is not found. This is due to the fact that Ubuntu 22.04 ships with boost 1.74.0 and therefore only the file libboost_filesystem.so.1.74.0 exists. The libraries are found in /usr/lib/x86_64-linux-gnu.

A quick and dirty method was for me to add a symbolic link:

ln -s libboost_filesystem.so libboost_filesystem.so.1.71.0 

But keep in mind that this creates library inconsistencies because you want to execute code with the older library version and the newer version could have deleted something that the code breaks.

A cleaner approach would be the installation of the older boost version but this is not possible through apt because version 1.71 is for ubuntu 22.04 which is obsolete.

3
  • 1
    Thank you @Simon
    – Raphael10
    Feb 13 at 11:04
  • I added symbolic link but still getting the same error Feb 23 at 18:37
  • @SiddharthDas Do you also use Ubuntu 22.04 and have boost 1.74 installed? Are the symbolic_links set correctly and is the error message completly identical as before?
    – Simon
    Feb 24 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .