[Tile-serving] [openstreetmap/osm2pgsql] osm2pgsql failed due to error: open failed for .bz2. (#870)
Marcos Dione
notifications at github.com
Wed Sep 26 08:34:56 UTC 2018
I run `osm2pgsql` under `strace` and I noticed that it says it's reading the file before even opening it:
```
$ strace -ff osm2pgsql -v --number-processes 4 -c -O null --bbox 0,43,1,44 europe-latest.osm.pbf
[...]
write(2, "\nReading in file: europe-latest."..., 40) = 40
write(2, "Applying Bounding box: 0.000000,"..., 64) = 64
write(2, "Using PBF parser.\n", 18) = 18
openat(AT_FDCWD, "europe-latest.osm.pbf", O_RDONLY) = 3
```
What this means is that the message is misleading. Even the parser seems to be selected based on the extension of the filename passed, not checking the contents of the file.
Now, the reason the command is failing for you I don't know. You should make sure the file is there. Could you pass the list of commands you executed just before `osm2pgsql`? I have the suspicion that you executed `su - postgres`, which could have changed the directory where you're at. You could try running `ls pakistan-latest.osm.bz2` before running `osm2pgsql` to make sure the file is there. You can also use `pwd` to see that the directory where you downloaded the file is the same as the directory you're running `osm2pgsql`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/870#issuecomment-424632486
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180926/5f0ed663/attachment.html>
More information about the Tile-serving
mailing list