Closed MalteHillmann closed 8 months ago
Just in case: Keep in Mind that the Version of osm2pgsql available in Ubuntu 22.04 (1.6.0) is not sufficient for doing database imports for rendering. This has to be at least version 1.7.0!
Works fine using Debian 11 and osm2pgsql from official backports. BTW one of the reasons I suggest using Debian 11 (stable) instead of Ubuntu,
I am unable to reproduce this problem in my Ubuntu 22.04 chroot. Works fine as explained in INSTALL.md.
What does does the output of luarocks
without paramater look like for you?
Keep in Mind that the Version of osm2pgsql available in Ubuntu 22.04 (1.6.0) is not sufficient for doing database imports for rendering. This has to be at least version 1.7.0!
Yes, i know that. But i'm having problems with 1.7.2, too. :/
What does does the output of
luarocks
without paramater look like for you?
luarocks
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
[--only-server <server>] [--only-sources <url>]
[--namespace <namespace>] [--lua-dir <prefix>]
[--lua-version <ver>] [--tree <tree>] [--local] [--global]
[--verbose] [--timeout <seconds>] [--pin] [<command>] ...
LuaRocks 3.8.0, the Lua package manager
/usr/bin/luarocks - LuaRocks main command-line interface
Options:
-h, --help Show this help message and exit.
--version Show version info and exit.
--dev Enable the sub-repositories in rocks servers for
rockspecs of in-development versions.
--server <server> Fetch rocks/rockspecs from this server (takes priority
over config file).
--only-server <server>
Fetch rocks/rockspecs from this server only (overrides
any entries in the config file).
--only-sources <url> Restrict downloads to paths matching the given URL.
--namespace <namespace>
Specify the rocks server namespace to use.
--lua-dir <prefix> Which Lua installation to use.
--lua-version <ver> Which Lua version to use.
--tree <tree> Which tree to operate on.
--local Use the tree in the user's home directory.
To enable it, see '/usr/bin/luarocks help path'.
--global Use the system tree when `local_by_default` is `true`.
--verbose Display verbose output of commands executed.
--timeout <seconds> Timeout on network operations, in seconds.
0 means no timeout (wait forever). Default is 30.
--pin Create a luarocks.lock file listing the exact versions
of each dependency found for this rock (recursively),
and store it in the rock's directory. Ignores any
existing luarocks.lock file in the rock's sources.
Commands:
help Show help for commands.
completion Output a shell completion script.
build Build/compile a rock.
config Query information about the LuaRocks configuration.
doc Show documentation for an installed rock.
download Download a specific rock file from a rocks server.
init Initialize a directory for a Lua project using
LuaRocks.
install Install a rock.
lint Check syntax of a rockspec.
list List currently installed rocks.
make Compile package in current directory using a rockspec.
new_version Auto-write a rockspec for a new version of a rock.
pack Create a rock, packing sources or binaries.
path Return the currently configured package path.
purge Remove all installed rocks from a tree.
remove Uninstall a rock.
search Query the LuaRocks servers.
show Show information about an installed rock.
test Run the test suite in the current directory.
unpack Unpack the contents of a rock.
upload Upload a rockspec to the public rocks repository.
which Tell which file corresponds to a given module name.
write_rockspec Write a template for a rockspec file.
Variables:
Variables from the "variables" table of the configuration file can be
overridden with VAR=VALUE assignments.
Configuration:
Lua:
Version : 5.1
Interpreter: /usr/bin/lua5.1 (ok)
LUA_DIR : /usr (ok)
LUA_BINDIR : /usr/bin (ok)
LUA_INCDIR : (not found)
****************************************
Use the command
luarocks config variables.LUA_INCDIR <dir>
to fix the location
****************************************
LUA_LIBDIR : (not found)
****************************************
Use the command
luarocks config variables.LUA_LIBDIR <dir>
to fix the location
****************************************
Configuration files:
System : /etc/luarocks/config-5.1.lua (ok)
User : /root/.luarocks/config-5.1.lua (not found)
Rocks trees in use:
/root/.luarocks
/usr/local
It seems to use the wrong lua version.
The luarocks-5.3
binary uses correct lua version:
luarocks-5.3
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
[--only-server <server>] [--only-sources <url>]
[--namespace <namespace>] [--lua-dir <prefix>]
[--lua-version <ver>] [--tree <tree>] [--local] [--global]
[--verbose] [--timeout <seconds>] [--pin] [<command>] ...
LuaRocks 3.8.0, the Lua package manager
/usr/bin/luarocks - LuaRocks main command-line interface
Options:
-h, --help Show this help message and exit.
--version Show version info and exit.
--dev Enable the sub-repositories in rocks servers for
rockspecs of in-development versions.
--server <server> Fetch rocks/rockspecs from this server (takes priority
over config file).
--only-server <server>
Fetch rocks/rockspecs from this server only (overrides
any entries in the config file).
--only-sources <url> Restrict downloads to paths matching the given URL.
--namespace <namespace>
Specify the rocks server namespace to use.
--lua-dir <prefix> Which Lua installation to use.
--lua-version <ver> Which Lua version to use.
--tree <tree> Which tree to operate on.
--local Use the tree in the user's home directory.
To enable it, see '/usr/bin/luarocks help path'.
--global Use the system tree when `local_by_default` is `true`.
--verbose Display verbose output of commands executed.
--timeout <seconds> Timeout on network operations, in seconds.
0 means no timeout (wait forever). Default is 30.
--pin Create a luarocks.lock file listing the exact versions
of each dependency found for this rock (recursively),
and store it in the rock's directory. Ignores any
existing luarocks.lock file in the rock's sources.
Commands:
help Show help for commands.
completion Output a shell completion script.
build Build/compile a rock.
config Query information about the LuaRocks configuration.
doc Show documentation for an installed rock.
download Download a specific rock file from a rocks server.
init Initialize a directory for a Lua project using
LuaRocks.
install Install a rock.
lint Check syntax of a rockspec.
list List currently installed rocks.
make Compile package in current directory using a rockspec.
new_version Auto-write a rockspec for a new version of a rock.
pack Create a rock, packing sources or binaries.
path Return the currently configured package path.
purge Remove all installed rocks from a tree.
remove Uninstall a rock.
search Query the LuaRocks servers.
show Show information about an installed rock.
test Run the test suite in the current directory.
unpack Unpack the contents of a rock.
upload Upload a rockspec to the public rocks repository.
which Tell which file corresponds to a given module name.
write_rockspec Write a template for a rockspec file.
Variables:
Variables from the "variables" table of the configuration file can be
overridden with VAR=VALUE assignments.
Configuration:
Lua:
Version : 5.3
Interpreter: /usr/bin/lua5.3 (ok)
LUA_DIR : /usr (ok)
LUA_BINDIR : /usr/bin (ok)
LUA_INCDIR : /usr/include/lua5.3 (ok)
LUA_LIBDIR : /usr/lib/x86_64-linux-gnu (ok)
Configuration files:
System : /etc/luarocks/config-5.3.lua (ok)
User : /root/.luarocks/config-5.3.lua (not found)
Rocks trees in use:
/root/.luarocks
/usr/local
Maybe I should try Debian 11, too. osm2pgsql (1.7.0 and 1.7.2) keeps crashing with:
2023-01-02 15:31:25 osm2pgsql version 1.7.0
2023-01-02 15:31:25 Database version: 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1)
2023-01-02 15:31:25 PostGIS version: 3.2
Processing: Node(4932k 126.5k/s) Way(2k 2.00k/s) Relation(0 0.0/s)free(): invalid size
Aborted
Debian 11 works out of the box...
2023-01-02 16:13:58 osm2pgsql version 1.7.2
2023-01-02 16:13:58 Database version: 13.9 (Debian 13.9-0+deb11u1)
2023-01-02 16:13:58 PostGIS version: 3.1
2023-01-02 16:20:29 Reading input files done in 390s (6m 30s).
2023-01-02 16:20:29 Processed 4932811 nodes in 366s (6m 6s) - 13k/s
2023-01-02 16:20:29 Processed 439649 ways in 22s - 20k/s
2023-01-02 16:20:29 Processed 2884 relations in 2s - 1k/s
2023-01-02 16:20:30 No marked ways (Skipping stage 2).
2023-01-02 16:20:30 Clustering table 'planet_osm_hstore_point' by geometry...
2023-01-02 16:20:30 Creating id index on table 'planet_osm_hstore_route'...
2023-01-02 16:20:30 Done postprocessing on table 'planet_osm_nodes' in 0s
2023-01-02 16:20:30 Clustering table 'planet_osm_hstore_line' by geometry...
2023-01-02 16:20:30 Clustering table 'planet_osm_hstore_polygon' by geometry...
2023-01-02 16:20:30 Clustering table 'planet_osm_hstore_roads' by geometry...
2023-01-02 16:20:30 Building index on table 'planet_osm_ways'
2023-01-02 16:20:30 Building index on table 'planet_osm_rels'
2023-01-02 16:20:30 Analyzing table 'planet_osm_hstore_route'...
2023-01-02 16:20:30 Creating geometry index on table 'planet_osm_hstore_point'...
2023-01-02 16:20:30 Creating geometry index on table 'planet_osm_hstore_roads'...
2023-01-02 16:20:31 Creating id index on table 'planet_osm_hstore_roads'...
2023-01-02 16:20:31 Analyzing table 'planet_osm_hstore_roads'...
2023-01-02 16:20:32 Creating id index on table 'planet_osm_hstore_point'...
2023-01-02 16:20:32 Analyzing table 'planet_osm_hstore_point'...
2023-01-02 16:20:34 Creating geometry index on table 'planet_osm_hstore_polygon'...
2023-01-02 16:20:35 Done postprocessing on table 'planet_osm_ways' in 4s
2023-01-02 16:20:35 Done postprocessing on table 'planet_osm_rels' in 0s
2023-01-02 16:20:35 All postprocessing on table 'planet_osm_hstore_point' done in 1s.
2023-01-02 16:20:35 Creating geometry index on table 'planet_osm_hstore_line'...
2023-01-02 16:20:36 Creating id index on table 'planet_osm_hstore_polygon'...
2023-01-02 16:20:36 Analyzing table 'planet_osm_hstore_polygon'...
2023-01-02 16:20:37 Creating id index on table 'planet_osm_hstore_line'...
2023-01-02 16:20:38 Analyzing table 'planet_osm_hstore_line'...
2023-01-02 16:20:38 All postprocessing on table 'planet_osm_hstore_line' done in 7s.
2023-01-02 16:20:38 All postprocessing on table 'planet_osm_hstore_roads' done in 1s.
2023-01-02 16:20:38 All postprocessing on table 'planet_osm_hstore_polygon' done in 5s.
2023-01-02 16:20:38 All postprocessing on table 'planet_osm_hstore_route' done in 0s.
2023-01-02 16:20:38 osm2pgsql took 400s (6m 40s) overall.
Try setting default lua to 5.3 or uninstall lua 5.1 if possible.
~/ > update-alternatives --list lua-interpreter
/usr/bin/lua5.3
Code is no longer dependent on lrexlib-pcre
https://github.com/giggls/osml10n/blob/9db770dbd09912c764d1aaee85635676d5a750b9/INSTALL.md?plain=1#L19 In Ubuntu 22.04 the command must be explicit the 5.3 version:
luarocks-5.3 install lrexlib-pcre
Otherwise it will result in an error:Error: Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.