maptiler / tileserver-gl

Vector and raster maps with GL styles. Server side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
https://tileserver.readthedocs.io/en/latest/
Other
2.26k stars 643 forks source link

[Question] Installing on Centos7 #465

Open toton6868 opened 4 years ago

toton6868 commented 4 years ago

I am trying to install Tileserver-GL on Centos7. Using node version 10.12.0. The Tileserver-GL is installing as it is returning its version and help. But when I am trying to start the server by tileserver-gl zurich_switzerland.mbtiles it is returning

/usr/src/app/tileserver-gl/node_modules/sharp/lib/constructor.js:1
Error: 
Something went wrong installing the "sharp" module

/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/src/app/tileserver-gl/node_modules/sharp/build/Release/sharp.node)

- Remove the "node_modules/sharp" directory then run
  "npm install --ignore-scripts=false --verbose" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues

    at Object.<anonymous> (/usr/src/app/tileserver-gl/node_modules/sharp/lib/constructor.js:34:9)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Here is my installation script

#!/bin/bash

yum -y install epel-release
yum -y update
yum -y -q install \
  autoconf \
  automake \
  cairo \
  cairo-devel \
  cairomm-devel \
  cmake3 \
  curl \
  gcc \
  gcc-c++ \
  giflib-devel \
  git \
  git-core \
  libcurl \
  libjpeg-turbo-devel \
  mesa-dri-drivers \
  pango \
  pango-devel \
  pangomm \
  pangomm-devel \
  protobuf \
  protobuf-compiler \
  protobuf-devel \
  xorg-x11-server-Xvfb 

yum install -y centos-release-scl
yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++
source scl_source enable devtoolset-8
scl enable devtoolset-8 -- bash

# Install Node
curl https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 10.16.2

# Tileserver-GL Installation
git clone https://github.com/maptiler/tileserver-gl.git
cd tileserver-gl
npm_config_user=root npm install -g 
npm uninstall sqlite3 
npm install --save sqlite3 
npm rebuild
RobJN commented 4 years ago

Same issue. Did you manage to fix this @toton6868 ?

toton6868 commented 4 years ago

Not yet