Cannot install kosmtik on debian bulleyes
deb75 opened this issue · comments
deb75 commented
Hello,
I try to install kosmtik
on debian bulleyes with the lts version of npm
(sudo n lts
) with :
sudo npm install -g kosmtik
I get the error :
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated protozero@1.5.1: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/kosmtik -> /usr/local/lib/node_modules/kosmtik/index.js
> mapnik@3.7.2 install /usr/local/lib/node_modules/kosmtik/node_modules/mapnik
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.7.2/node-v83-linux-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for mapnik@3.7.2 and node@14.16.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.16.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/.node-gyp'
gyp ERR! System Linux 5.11.13-surface
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding"
gyp ERR! cwd /usr/local/lib/node_modules/kosmtik/node_modules/mapnik
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.11.13-surface
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/kosmtik/node_modules/mapnik
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/usr/local/lib/node_modules/kosmtik/node_modules/mapnik/lib/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mapnik@3.7.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mapnik@3.7.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-23T21_45_26_354Z-debug.log
I tried to install from source :
git clone https://github.com/kosmtik/kosmtik.git
cd kosmtik/
sudo npm install -g
it seems to work :
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/kosmtik -> /usr/local/lib/node_modules/kosmtik/index.js
npm WARN lifecycle mapnik@4.5.8~install: cannot run in wd mapnik@4.5.8 node-pre-gyp install --fallback-to-build (wd=/home/xxx/work/map/kosmtik/node_modules/mapnik)
+ kosmtik@0.0.17
added 614 packages from 999 contributors in 48.954s
but when I run kosmtik
, I get :
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '/home/xxx/work/map/kosmtik/node_modules/mapnik/lib/binding/mapnik_settings.js'
Require stack:
- /home/xxx/work/map/kosmtik/node_modules/mapnik/lib/mapnik.js
- /home/xxx/work/map/kosmtik/src/Config.js
- /home/xxx/work/map/kosmtik/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/home/xxx/work/map/kosmtik/node_modules/mapnik/lib/mapnik.js:8:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/xxx/work/map/kosmtik/node_modules/mapnik/lib/mapnik.js',
'/home/xxx/work/map/kosmtik/src/Config.js',
'/home/xxx/work/map/kosmtik/index.js'
]
}
deb75 commented
I got it working with :
git clone https://github.com/kosmtik/kosmtik.git
cd kosmtik/
npm install