Trying to setup vector tiles server with static image support.
Referring http://tileserver.readthedocs.io/en/latest/installation.html and https://github.com/klokantech/tileserver-gl
While trying to install tileserver-gl command in my mac machine and in a centos machine, met below err. (alignment is not easy here ?)
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN lifecycle @mapbox/mapbox-gl-native@3.5.4~preinstall: cannot run in wd %s %s (wd=%s) @mapbox/mapbox-gl-native@3.5.4 npm install node-pre-gyp /usr/local/lib/node_modules/.staging/@mapbox/mapbox-gl-native-74bf2b00
/usr/local/bin/tileserver-gl -> /usr/local/lib/node_modules/tileserver-gl/src/main.js
> sqlite3@3.1.13 install /usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
[sqlite3] Success: "/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node" is installed via remote
> @mapbox/mapbox-gl-native@3.5.4 install /usr/local/lib/node_modules/tileserver-gl/node_modules/@mapbox/mapbox-gl-native
> node-pre-gyp install --fallback-to-build=false || make node
[@mapbox/mapbox-gl-native] Success: "/usr/local/lib/node_modules/tileserver-gl/node_modules/@mapbox/mapbox-gl-native/lib/mapbox_gl_native.node" is installed via remote
> canvas@1.6.8 install /usr/local/lib/node_modules/tileserver-gl/node_modules/canvas
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/rajavelu-1469/.node-gyp/6.11.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tileserver-gl/node_modules/canvas/.node-gyp"
./util/has_lib.sh: line 31: pkg-config: command not found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/tileserver-gl/node_modules/canvas
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
/usr/local/lib
└── (empty)
npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "tileserver-gl"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! canvas@1.6.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.6.8 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/rajavelu-1469/npm-debug.log
npm ERR! code 1
asked
06 Mar '18, 08:07
Rajavelu_M
253●45●48●58
accept rate:
33%
Also tried in centos machine & got following error, any idea?
Starting tileserver-gl v2.3.1
No MBTiles specified, using india.mbtiles
Automatically creating config file for india.mbtiles
Run with --verbose to see the config file here.
module.js:471
Error: Cannot find module '../build/Release/sharp.node'