osrm-backend: Error while using Docker-Container: Error while loading shared libraries
Hello there,
I’ve got the following (extract) of a Docker-compose file:
osrm-server:
image: osrm/osrm-backend
build:
context: .
dockerfile: ./osrm/Dockerfile.osrm
ports:
- 5000:5000
command: bash -c "osrm-routed --algorithm mld berlin-latest.osrm"
The Dockerfile.osrm looks like this:
FROM osrm/osrm-backend
RUN apt-get update
RUN apt-get install -y wget
RUN wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
RUN osrm-extract -p /opt/car.lua berlin-latest.osm.pbf
RUN osrm-partition berlin-latest.osrm
RUN osrm-customize berlin-latest.osrm
EXPOSE 5000
But now the osrm-extract command is throwing an error:
osrm-extract: error while loading shared libraries: libboost_program_options.so.1.67.0: cannot open shared object file: No such file or directory
ERROR: Service 'osrm-server' failed to build: The command '/bin/sh -c osrm-extract -p /opt/car.lua berlin-latest.osm.pbf' returned a non-zero code: 127
We tested the same Dockerfile + Docker-compose on another machine and it works there, does anybody now how to fix it?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 19 (5 by maintainers)
Using tag v5.20.0 fixes the problem and i would guess that switching the image to debian (f978900ab) causes the issue. I’m a bit confused that latest is not the latest relase but seems to be the current master. Would it not make sense to point latest to the lastest release and use a tag develop/beta/master or something similar for current developments.
Will be fixed in 5.21 by #5311, thanks @xydinesh
I tried with following docker-compose too. I can’t reproduce this issue
@xydinesh : my proposal https://github.com/ImreSamu/osrm-backend/commit/3c36326799a2df3aeb883921a745ef30122e22e7 you can resuse/adapt/drop … 😉
I also have the issue on a fresh install of my machine (docker was installed 5 min ago)
Here is the result of
docker image lsEdit: i pinned the version to
v5.20.0and it works. Seems thatlatestis the only version causing a problem.I tried with the current version(
3d781e6f28242623e45ff3c8da27a0122012e52d) and got the same error(lib not found). Withv5.20.0@sha256:23c75d40c83b287476e0ea0883dfe7c06c3d54302d41df343c36079b8a06f36eworked fine.tip: I tried to create a symlink from
libboost_program_options.so.1.67.0tolibboost_program_options.so.1.68.0but didn’t work too.it was a mistake.
instead of
and
command: sh -c "osrm-routed --algorithm mld france-latest.osm"instead ofcommand: sh -c "osrm-routed --algorithm mld france-latest-osrm"Thanks.