Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error trying to build osm2pgsql #18

Closed
haroldship opened this issue Dec 24, 2015 · 6 comments
Closed

error trying to build osm2pgsql #18

haroldship opened this issue Dec 24, 2015 · 6 comments

Comments

@haroldship
Copy link

I'm pretty new to docker. I hand-built an OSM tile server and want to create a docker image, hopefully based on yours, but with some modifications.

I git-cloned and tried to build the image. I get many warnings, but ultimately the build fails on this error:

Step 10 : RUN cd /tmp && git clone git://github.com/openstreetmap/osm2pgsql.git
---> Running in e21dc5361327
Cloning into 'osm2pgsql'...
---> 93cdcd7b258e
Removing intermediate container e21dc5361327
Step 11 : RUN cd /tmp/osm2pgsql && ./autogen.sh && ./configure && make && make install
---> Running in 4c82958004c8
/bin/sh: 1: ./autogen.sh: not found
The command '/bin/sh -c cd /tmp/osm2pgsql && ./autogen.sh && ./configure && make && make install' returned a non-zero code: 127

There appears to be an image in docker images

@erikj
Copy link

erikj commented Dec 26, 2015

it looks like the build process for osm2pgsql changed w/ this commit: osm2pgsql-dev/osm2pgsql@b0ef269#diff-04c6e90faac2675aa89e2176d2eec7d8

to resolve the issue, you can either update your Dockerfile to

@haroldship
Copy link
Author

Thanks that worked for the build. However, when I try to import I get the following error:

Importing /data/import.osm into his
800
osm2pgsql SVN version 0.89.0-dev (64 bit id space)

Osm2pgsql failed due to ERROR: Couldn't open style file './default.style': No such file or directory
^C*** Shutting down /usr/local/sbin/run (PID 95)...

@erikj
Copy link

erikj commented Dec 31, 2015

Osm2pgsql failed due to ERROR: Couldn't open style file './default.style': No such file or directory
^C*** Shutting down /usr/local/sbin/run (PID 95)...

That looks like it's related to osm2pgsql-dev/osm2pgsql#515: New master build needs specifying default style

You should be able to get around it by checking out a prior commit (per above) or adding the specified flag to import()'s osm2pgsql command:

--style /usr/local/share/osm2pgsql/default.style 

https://github.com/geo-data/openstreetmap-tiles-docker/blob/master/run.sh#L81

@haroldship
Copy link
Author

Thank you again @erikj. However, I had to make some other changes in order to get things working (they are now). Would you like the changes?

@erikj
Copy link

erikj commented Jan 4, 2016

@haroldship yeah, that would be great, thanks!

and you're welcome! :)

@haroldship
Copy link
Author

sent a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants