我已安装Node V10.19.0和tileserver-gl
我在主目录中创建了一个bash文件,名称为tileserver.sh
其中包含以下代码:
xvfb-run -a -s "-screen 0 1024x768x24" tilerserver-gl NewZeland.mbtiles
当我执行它时,它工作正常,并在端口8080上监听并且我在/etc/systemd/system/tileserver.service中创建了该文件的服务并启用了
sudo systemctl status tileserver.service
它显示下面的错误,
Loaded: loaded (/etc/systemd/system/tileserver.service: enabled; vendor preset: enabled)
Active: Failed (Result: exit-code) since .....
process: 3729 ExecStart=/home/tilesServer/tileserver.sh ( code=exited, status=126)
Main PID: 3729 ( code=exited, status=126)
mar 26 18:21:57 tileserver systemd started tileserver bash script runing
mar 26 18:21:57 tilerserver tileserver.sh[3729] : /usr/bin/env "node' Permission denied
mar 26 18:21:57 tileserver systemd[1]: tileserver.service: main process exited , code=exited, status=126/n/a
mar 26 18:21:57 tileserver systemd[1]: tileserver.service: Failed with result 'exit-code'
如何解决此问题和错误
我建议您使用NVM并以普通用户身份安装它,在安装NVM之后,应使用nvm install stable
安装NodeJS以获得节点稳定版本,然后您可以进行测试。
我希望这可以帮助您。
最诚挚的问候,
Judlup