kosmtik icon indicating copy to clipboard operation
kosmtik copied to clipboard

some problems on installation

Open sevku opened this issue 4 years ago • 5 comments

$ npm install kosmtik
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/user/node_modules/mapnik
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/user/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/home/user/node_modules/mapnik/lib/binding' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/user/node_modules/mapnik/lib/binding/mapnik.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v64-linux-x64-Release.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v64-linux-x64-Release.tar.gz
npm ERR! node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v64-linux-x64-Release.tar.gz 
npm ERR! node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v64-linux-x64-Release.tar.gz 
npm ERR! node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v64-linux-x64-Release.tar.gz 
npm ERR! node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http Connection closed while downloading tarball file 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/node_modules/mapnik/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/node_modules/mapnik/common.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/.cache/node-gyp/10.19.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/user/.cache/node-gyp/10.19.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/user/.cache/node-gyp/10.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/user/node_modules/mapnik',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.' ]
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/node_modules/mapnik/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/node_modules/mapnik/common.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/user/.cache/node-gyp/10.19.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/user/.cache/node-gyp/10.19.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/user/.cache/node-gyp/10.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/user/node_modules/mapnik',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.' ]
npm ERR! /bin/sh: 1: mapnik-config: not found
npm ERR! gyp: Call to 'mapnik-config --cflags' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! /bin/sh: 1: mapnik-config: not found
npm ERR! gyp: Call to 'mapnik-config --cflags' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 5.4.0-81-generic
npm ERR! gyp ERR! commandgyp "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/user/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/home/user/node_modules/mapnik/lib/binding"
npm ERR!  gyp ERR!ERR! cwd  /home/user/node_modules/mapnik
npm ERR! configure error 
npm ERR! gyp ERR! node -v v10.19.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 5.4.0-81-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/user/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/home/user/node_modules/mapnik/lib/binding"
npm ERR! gyp ERR! cwd /home/user/node_modules/mapnik
npm ERR! gyp ERR! node -v v10.19.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/user/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/home/user/node_modules/mapnik/lib/binding' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/user/node_modules/mapnik/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npm ERR! node-pre-gyp ERR! System Linux 5.4.0-81-generic
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/user/node_modules/mapnik/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/user/node_modules/mapnik
npm ERR! node-pre-gyp ERR! node -v v10.19.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.6.39
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-09-14T15_06_54_983Z-debug.log

sevku avatar Sep 14 '21 15:09 sevku

same issue here.

andreas83 avatar Oct 04 '21 07:10 andreas83

mapnik v3.7.2 looks quite old. the newest is 4.5.8

mathisloge avatar Oct 18 '21 20:10 mathisloge

Same problem

polymathuk avatar Mar 04 '22 10:03 polymathuk

Ok. Looks like npm module wasn't update more than 4 years. Its mean that npm module have old dependencies. You have 2 choices to solve it. Or switch to node v.9.3.0 using nvm or clone this repository by git clone and after run command npm install.

gunyakov avatar Apr 28 '22 18:04 gunyakov

Solved thanks to gunyakov!

davide84 avatar Oct 08 '22 20:10 davide84