[英]cannot install snmpjs in nodejs -npm
I want to use snmpjs library in my project, but I cant install this package, I've downloaded the last npm, nodejs version but when I try this command: 我想在我的项目中使用snmpjs库,但是我无法安装该软件包,我已经下载了最新的npm,nodejs版本,但是当我尝试此命令时:
npm install snmpjs
this error raised: 出现此错误:
snmpjs@0.1.8 install /home/user/Desktop/Project1/node_modules/snmpjs
jison -o lib/parser.js lib/snmp.jison
sh: 1: jison: Permission denied
/home/user/Desktop/Project1/
├── ejs@2.5.5
├── express@4.14.0
├── kafka-node@1.0.7
├── net-snmp@1.1.19
└── pg@6.1.2
npm WARN enoent ENOENT: no such file or directory, open '/home/user/Desktop/Project1/package.json'
npm WARN Project1 No description
npm WARN Project1 No repository field.
npm WARN Project1 No README data
npm WARN Project1 No license field.
npm ERR! Linux 3.13.0-105-generic
npm ERR! argv "/home/user/.nvm/versions/node/v5.9.1/bin/node" "/home/user/.nvm/versions/node/v5.9.1/bin/npm" "install" "snmpjs"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! snmpjs@0.1.8 install: `jison -o lib/parser.js lib/snmp.jison`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the snmpjs@0.1.8 install script 'jison -o lib/parser.js lib/snmp.jison'.
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 snmpjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! jison -o lib/parser.js lib/snmp.jison
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs snmpjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls snmpjs
npm ERR! There is likely additional logging output above.
I've tried sudo and I got this error: 我试过sudo并收到以下错误消息:
sh: 1: jison: Permission denied
npm ERR! weird error 126
npm ERR! not ok code 0
Try this: 尝试这个:
npm uninstall XXXX
npm cache clean
npm i -g npm
I meet the problem on debian clould system.and after update node and npm. 我在debian clould system.and更新节点和npm之后遇到了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.