【发布时间】:2021-12-11 14:01:02
【问题描述】:
我一直在关注本教程: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/
然后被卡住了
carto project.mml > mapnik.xml
我的目标是设置 OSM 服务器 - 因此 carto 的预期行为是将 project.mml 编译为“准备渲染”mapnik.xml。
实际行为如下: Carto 引发错误:
ubuadmin@klab-osm:~/src/openstreetmap-carto$ carto -v
/usr/lib/nodejs/carto/lib/carto/tree/reference.js:19
if (mapnik_reference.version.hasOwnProperty(version)) {
^
TypeError: Cannot read property 'hasOwnProperty' of undefined
at Object.ref.setVersion (/usr/lib/nodejs/carto/lib/carto/tree/reference.js:19:34)
at /usr/lib/nodejs/carto/lib/carto/tree/reference.js:209:5
at Object.<anonymous> (/usr/lib/nodejs/carto/lib/carto/tree/reference.js:213:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
我知道这个 Github 问题: https://github.com/gravitystorm/openstreetmap-carto/issues/3409 这个问题: TypeError: Cannot read property 'hasOwnProperty' of undefined node-carto 但没有发现它们有帮助。
我正在使用 Ubuntu 20.04 Focal Fossa,mapnik 版本是 0.1,由于上述错误,我无法检查 carto 版本。
技巧是,由于公司政策,我正在使用的机器没有(也不会)连接到互联网 - 我通过 SSH 登录。因此,我使用sudo apt install nodejs-carto insted of npm install -g carto 安装了carto - 该公司在内联网内的Ubuntu存储库上有镜像。
【问题讨论】:
标签: javascript openstreetmap ubuntu-20.04 mapnik