我已完全按照指示从“ https://gauge.org/getting-started-guide/quick-install/”安装量规,但无法安装。
我从一个新的GCP Debian实例开始。安装NodeJS PPM之后,然后按照说明进行操作,“仪表”将在/ usr / lib / node_modules / @ getgauge / cli / bin下安装一个空白文件。我收到以下文件权限错误。全部都以root身份运行。
root@instance-1:~# npm -v
6.9.0
root@instance-1:~# node -v
v10.16.3
root@instance-1:~# npm install -g npm@latest
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
+ npm@6.11.2
added 19 packages from 13 contributors, removed 15 packages and updated 53 packages in 6.895s
root@instance-1:~# npm install -g @getgauge/cli
/usr/bin/gauge -> /usr/lib/node_modules/@getgauge/cli/bin/gauge
> @getgauge/cli@1.0.5 install /usr/lib/node_modules/@getgauge/cli
> node ./src/index.js
Fetching download url for Gauge version 1.0.5
Downloading https://github.com/getgauge/gauge/releases/download/v1.0.5/gauge-1.0.5-linux.x86_64.zip to ./bin
{ [Error: EACCES: permission denied, open 'bin/gauge'] errno: -13, code: 'EACCES', syscall: 'open', path: 'bin/gauge' }
+ @getgauge/cli@1.0.5
added 83 packages from 76 contributors in 6.48s
版本信息
root@gauge:~/gaugetest$ npm -v
6.11.2
root@gauge:~/gaugetest$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (stretch)
Release: 9.9
Codename: stretch
有什么想法吗?
答案 0 :(得分:0)
npm
使用root特权(默认为nobody)调用时,将uid更改为用户帐户或用户配置指定的uid。设置unsafe-perm
标志以具有root特权运行脚本。
您可以尝试npm run @getgauge/cli --uynsafe-perm