mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

Carto installation fails #481

Closed asimeqi closed 7 years ago

asimeqi commented 7 years ago

I am trying to install Carto but have had no success. It seems that it is trying to install gdal 0.9.4 and fails to do it, but I might be wrong. I have installed latest gdal ( 2.1.3) but it doesn't help.

Any help would be appreciated. I am willing to try other tools (My goal is to render OpenMapStreet tiles) but don't know which ones are available.

Here is the command output:

`C:\Users\Administrator>npm install -g carto

gdal@0.9.4 preinstall C:\Users\Administrator\AppData\Roaming\npm\node_modules\ .staging\gdal-85f23ae6 npm install node-pre-gyp

C:\Users\Administrator\AppData\Roaming\npm -- node-pre-gyp@0.6.36 +-- mkdirp@0.5.1 |-- minimist@0.0.8 +-- nopt@4.0.1 | +-- abbrev@1.1.0 | -- osenv@0.1.4 | +-- os-homedir@1.0.2 |-- os-tmpdir@1.0.2 +-- npmlog@4.1.2 | +-- are-we-there-yet@1.1.4 | | -- delegates@1.0.0 | +-- console-control-strings@1.1.0 | +-- gauge@2.7.4 | | +-- aproba@1.1.2 | | +-- has-unicode@2.0.1 | | +-- object-assign@4.1.1 | | +-- signal-exit@3.0.2 | | +-- string-width@1.0.2 | | | +-- code-point-at@1.1.0 | | |-- is-fullwidth-code-point@1.0.0 | | | -- number-is-nan@1.0.1 | | +-- strip-ansi@3.0.1 | | |-- ansi-regex@2.1.1 | | -- wide-align@1.1.2 |-- set-blocking@2.0.0 +-- rc@1.2.1 | +-- deep-extend@0.4.2 | +-- ini@1.3.4 | +-- minimist@1.2.0 | -- strip-json-comments@2.0.1 +-- request@2.81.0 | +-- aws-sign2@0.6.0 | +-- aws4@1.6.0 | +-- caseless@0.12.0 | +-- combined-stream@1.0.5 | |-- delayed-stream@1.0.0 | +-- extend@3.0.1 | +-- forever-agent@0.6.1 | +-- form-data@2.1.4 | | -- asynckit@0.4.0 | +-- har-validator@4.2.1 | | +-- ajv@4.11.8 | | | +-- co@4.6.0 | | |-- json-stable-stringify@1.0.1 | | | -- jsonify@0.0.0 | |-- har-schema@1.0.5 | +-- hawk@3.1.3 | | +-- boom@2.10.1 | | +-- cryptiles@2.0.5 | | +-- hoek@2.16.3 | | -- sntp@1.0.9 | +-- http-signature@1.1.1 | | +-- assert-plus@0.2.0 | | +-- jsprim@1.4.0 | | | +-- assert-plus@1.0.0 | | | +-- extsprintf@1.0.2 | | | +-- json-schema@0.2.3 | | |-- verror@1.3.6 | | -- sshpk@1.13.1 | | +-- asn1@0.2.3 | | +-- assert-plus@1.0.0 | | +-- bcrypt-pbkdf@1.0.1 | | +-- dashdash@1.14.1 | | |-- assert-plus@1.0.0 | | +-- ecc-jsbn@0.1.1 | | +-- getpass@0.1.7 | | | -- assert-plus@1.0.0 | | +-- jsbn@0.1.1 | |-- tweetnacl@0.14.5 | +-- is-typedarray@1.0.0 | +-- isstream@0.1.2 | +-- json-stringify-safe@5.0.1 | +-- mime-types@2.1.15 | | -- mime-db@1.27.0 | +-- oauth-sign@0.8.2 | +-- performance-now@0.2.0 | +-- qs@6.4.0 | +-- safe-buffer@5.1.1 | +-- stringstream@0.0.5 | +-- tough-cookie@2.3.2 | |-- punycode@1.4.1 | +-- tunnel-agent@0.6.0 | -- uuid@3.1.0 +-- rimraf@2.6.1 |-- glob@7.1.2 | +-- fs.realpath@1.0.0 | +-- inflight@1.0.6 | +-- minimatch@3.0.4 | | -- brace-expansion@1.1.8 | | +-- balanced-match@1.0.0 | |-- concat-map@0.0.1 | -- path-is-absolute@1.0.1 +-- semver@5.3.0 +-- tar@2.2.1 | +-- block-stream@0.0.9 | +-- fstream@1.0.11 | |-- graceful-fs@4.1.11 | -- inherits@2.0.3 -- tar-pack@3.4.0 +-- debug@2.6.8 | -- ms@2.0.0 +-- fstream-ignore@1.0.5 +-- once@1.4.0 |-- wrappy@1.0.2 +-- readable-stream@2.3.3 | +-- core-util-is@1.0.2 | +-- isarray@1.0.0 | +-- process-nextick-args@1.0.7 | +-- string_decoder@1.0.3 | -- util-deprecate@1.0.2 -- uid-number@0.0.6

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "install" "node-pre-gyp" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules.staging\g dal-85f23ae6 npm ERR! code EBUSY npm ERR! errno -4082 npm ERR! syscall rmdir

npm ERR! EBUSY: resource busy or locked, rmdir 'C:\Users\Administrator\AppData\R oaming\npm\node_modules.staging\gdal-85f23ae6' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Administrator\AppData\Roaming\npm\node_modules.staging\gd al-85f23ae6\npm-debug.log C:\Users\Administrator\AppData\Roaming\npm `-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gdal@0.9.4 (node_modules\carto\n ode_modules\gdal): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gdal@0.9.4 preinstall: npm inst all node-pre-gyp npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 4294963214 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "install" "-g" "carto" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules.staging\a nsi-regex-0d1c1a0a npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Administrato r\AppData\Roaming\npm\node_modules.staging\ansi-regex-0d1c1a0a' -> 'C:\Users\Ad ministrator\AppData\Roaming\npm\node_modules\carto\node_modules\ansi-regex' npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Administrato r\AppData\Roaming\npm\node_modules.staging\ansi-regex-0d1c1a0a' -> 'C:\Users\Ad ministrator\AppData\Roaming\npm\node_modules\carto\node_modules\ansi-regex' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Administrator\npm-debug.log npm ERR! code 1

C:\Users\Administrator>`

nebulon42 commented 7 years ago

gdal is part of millstone which is a optional dependency. It is likely that carto still works if that fails. But I would have to verify on a Windows machine (VM) myself. Do you want to render the tiles for development or production? openstreetmap-carto recently got a Docker setup which might help you. It comes with a database container and a Kosmtik container. Kosmtik is map preview application. But this setup is not suitable for production.

asimeqi commented 7 years ago

I want to render the tiles so that I can use them in production. I use IIS as map server. It works fine with Leaflet. Kosmtik doesn't install either, gives similar warnings (about gdal) and errors. Thanks for the Docker pointer, I will see if I can use that.

nebulon42 commented 7 years ago

My test on a Windows 7 VM yielded the following result:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "node-pre-gyp"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\IEUser\AppData\Roaming\npm\node_modules\.staging\gdal-cae
c2f1c
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rmdir

npm ERR! EBUSY: resource busy or locked, rmdir 'C:\Users\IEUser\AppData\Roaming\
npm\node_modules\.staging\gdal-caec2f1c'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\IEUser\AppData\Roaming\npm\node_modules\.staging\gdal-caec
2f1c\npm-debug.log
C:\Users\IEUser\AppData\Roaming\npm
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gdal@0.9.4 (node_modules\carto\n
ode_modules\gdal):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gdal@0.9.4 preinstall: `npm inst
all node-pre-gyp`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 4294963214
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "carto"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\IEUser\AppData\Roaming\npm\node_modules\.staging\ansi-reg
ex-78891597
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\IEUser\AppDa
ta\Roaming\npm\node_modules\.staging\ansi-regex-78891597' -> 'C:\Users\IEUser\Ap
pData\Roaming\npm\node_modules\carto\node_modules\ansi-regex'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\IEUser\AppDa
ta\Roaming\npm\node_modules\.staging\ansi-regex-78891597' -> 'C:\Users\IEUser\Ap
pData\Roaming\npm\node_modules\carto\node_modules\ansi-regex'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\IEUser\npm-debug.log
npm ERR! code 1
nebulon42 commented 7 years ago

The dependencies that cause this are the following:

I have no idea why this fails on Win 7 with that specific Node version. It relies on binaries for that system which might not be available. You could try with a older Node version or ask at those repositories specifically.

As I have said millstone is only a optional dependency so carto might still work. There is not much what I can do here at the moment. If there are more and more problems with millstone I'm open to kicking it out completely.

pnorman commented 7 years ago

As I have said millstone is only a optional dependency so carto might still work. There is not much what I can do here at the moment. If there are more and more problems with millstone I'm open to kicking it out completely

Dragging in gdal has been moderately annoying for me on other installs but hasn't yet caused failures.

nebulon42 commented 7 years ago

@asimeqi I have published 0.18.2 which removes millstone as optional dependency. This should probably resolve your installation issue.

asimeqi commented 7 years ago

Thank you very much! It does indeed solve the installation issue. Carto now installs and it is usable.