关闭 dru5412 打开了这个问题 2016 年 12 月 4 日 · 8条评论 关闭 使用 npm 安装时出错#101 dru5412 打开了这个问题 2016 年 12 月 4 日 · 8条评论 注释 dru5412 评论了 2016 年 12 月 4 日 今天尝试了 npm install cncjs -g 并得到了很多与串口相关的错误。 node-pre-gyp 错误!尝试下载(404):https ://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.6/serialport-v4.0.6-node-v46-linux-arm.tar.gz node-pre-吉普错误!未找到 serialport@4.0.6 和 node@4.5.0 (node-v46 ABI) 的预构建二进制文件(使用 node-gyp 回退到源代码编译) gyp WARN EACCES 用户“root”没有访问开发者的权限dir “/root/.node-gyp/4.5.0” gyp WARN EACCES attempted to reinstall using temporary dev dir “/usr/local/lib/node_modules/cncjs/node_modules/serialport/.node-gyp” make: 进入目录 ‘ /usr/local/lib/node_modules/cncjs/node_modules/serialport/build’ make: *** No rule to make target ‘../.node-gyp/4.5.0/include/node/common.gypi’, 需要经过 ‘ 生成文件’。停止。 make: Leaving directory ‘/usr/local/lib/node_modules/cncjs/node_modules/serialport/build’ gyp 错误!构建错误 gyp ERR!堆栈错误:make失败,退出代码:2 gyp ERR!堆栈在 ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR!堆栈在 emitTwo (events.js:87:13) gyp ERR!堆栈在 ChildProcess.emit (events.js:172:7) gyp ERR!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR!系统 Linux 4.4.30+ 吉普错误!命令 “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” ” –module=/usr/local/lib/node_modules/cncjs/node_modules/serialport/build/Release/serialport.node” “–module_name=serialport” “–module_path=/usr/local/lib/node_modules/cncjs/ node_modules/serialport/build/Release” gyp 错误!cwd /usr/local/lib/node_modules/cncjs/node_modules/serialport gyp 错误!节点 -v v4.5.0 gyp 错误!node-gyp -v v3.4.0 gyp 错误!不好 node-pre-gyp 错误!构建错误 node-pre-gyp 错误!堆栈错误:无法执行 ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build –fallback-to-build –module =/usr/local/lib/node_mod ules/cncjs/node_modules/serialport/build/Release/serialport.node –module_name=serialport –module_path=/usr/local/lib/node_modules/cncjs/node_modules/serialport/build/发布’(1) node-pre-gyp ERR!堆栈在 ChildProcess。(/usr/local/lib/node_modules/cncjs/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)node-pre-gyp 错误!堆栈在 emitTwo (events.js:87:13) node-pre-gyp 错误!堆栈在 ChildProcess.emit (events.js:172:7) node-pre-gyp 错误!堆栈在 maybeClose (internal/child_process.js:829:16) node-pre-gyp 错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp 错误!系统 Linux 4.4.30+ node-pre-gyp 错误!命令“/usr/local/bin/node”“/usr/local/lib/node_modules/cncjs/node_modules/serialport/node_modules/.bin/node-pre-gyp”“安装”“–fallback-to-build” node-pre-gyp 错误!cwd /usr/local/lib/node_modules/cncjs/node_modules/serialport install: info lifecycle serialport@4.0.6~install: 执行安装脚本失败 node-pre-gyp 错误!node-pre-gyp -v v0.6.31 node-pre-gyp 错误!不好 似乎只是在下一步超时…… 有什么问题还是我做错了什么? 合作者 奇顿 评论了 2016 年 12 月 4 日 如果您使用的是根帐户,请尝试以下操作: $ sudo npm uninstall -g cncjs $ sudo npm install -g cncjs --unsafe-perm 作者 dru5412 评论了 2016 年 12 月 5 日 感谢提示,但这也发生在卸载/安装命令之后。 甚至尝试过 npm install serialport 并在查找此文件时抛出相同的 404 错误。 https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.6/serialport-v4.0.6-node-v46-linux-arm.tar.gz 我今天再试一次,看看问题是否仍然存在,然后再报告。 谢谢 合作者 奇顿 评论了 2016 年 12 月 5 日 • 编辑 你想在 Raspberry Pi 上安装 cncjs 吗?我建议你使用nvm管理 Node.js 版本,那么你不需要 root 权限来安装全局包。这将解决很多安装问题。 https://github.com/cheton/cnc#nodejs-installation 作者 dru5412 评论了 2016 年 12 月 5 日 设法解决了这个问题,这是因为安装时是 root sudo。 以带有 sudo 前缀的用户身份安装似乎可以解决问题。 不确定这是否是主要原因,但现在已修复,感谢您的帮助。 将关闭问题。 ?1个cheton 对 hooray 表情符号做出反应 dru5412已完成 关闭 2016 年 12 月 5 日 喜欢 (0) 实体联盟 #1037 Win64 – 无法启动 – 1.8.5 和 1.8.6 #102 v1.3.8-EDGE 重启后键盘快捷键消失 #427 关闭 无法在 gsender 1.2.0 中打开 .gcode 文件 #367 RaspberryPi 运行 gsender 时出现问题 #89 向 fluidnc 发送 $$ 会导致 gsender 崩溃 #473 v1.3.8-EDGE 重启后键盘快捷键消失 #427 关闭无法在 gsender 1.2.0 中打开 .gcode 文件 #367RaspberryPi 运行 gsender 时出现问题 #89向 fluidnc 发送 $$ 会导致 gsender 崩溃 #473功能请求:抑制发送到机器的 gcode 中的 gcode 注释。 #444 关闭通过网络连接进行连接 #171操纵杆运动的剩余问题 #204 关闭新版本认为我的机器一直处于锁定状态 #474 关闭
今天尝试了 npm install cncjs -g 并得到了很多与串口相关的错误。
node-pre-gyp 错误!尝试下载(404):https
://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.6/serialport-v4.0.6-node-v46-linux-arm.tar.gz node-pre-吉普错误!未找到 serialport@4.0.6 和 node@4.5.0 (node-v46 ABI) 的预构建二进制文件(使用 node-gyp 回退到源代码编译)
gyp WARN EACCES 用户“root”没有访问开发者的权限dir “/root/.node-gyp/4.5.0” gyp
WARN EACCES attempted to reinstall using temporary dev dir “/usr/local/lib/node_modules/cncjs/node_modules/serialport/.node-gyp”
make: 进入目录 ‘ /usr/local/lib/node_modules/cncjs/node_modules/serialport/build’
make: *** No rule to make target ‘../.node-gyp/4.5.0/include/node/common.gypi’, 需要经过 ‘ 生成文件’。停止。
make: Leaving directory ‘/usr/local/lib/node_modules/cncjs/node_modules/serialport/build’ gyp
错误!构建错误
gyp ERR!堆栈错误:
make失败,退出代码:2gyp ERR!堆栈在 ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp
ERR!堆栈在 emitTwo (events.js:87:13) gyp
ERR!堆栈在 ChildProcess.emit (events.js:172:7) gyp
ERR!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp
ERR!系统 Linux 4.4.30+
吉普错误!命令 “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” ” –module=/usr/local/lib/node_modules/cncjs/node_modules/serialport/build/Release/serialport.node” “–module_name=serialport” “–module_path=/usr/local/lib/node_modules/cncjs/ node_modules/serialport/build/Release” gyp
错误!cwd /usr/local/lib/node_modules/cncjs/node_modules/serialport gyp
错误!节点 -v v4.5.0 gyp
错误!node-gyp -v v3.4.0 gyp
错误!不好
node-pre-gyp 错误!构建错误
node-pre-gyp 错误!堆栈错误:无法执行 ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build –fallback-to-build –module =/usr/local/lib/node_mod ules/cncjs/node_modules/serialport/build/Release/serialport.node –module_name=serialport –module_path=/usr/local/lib/node_modules/cncjs/node_modules/serialport/build/发布’(1)
node-pre-gyp ERR!堆栈在 ChildProcess。(/usr/local/lib/node_modules/cncjs/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)node-pre-gyp
错误!堆栈在 emitTwo (events.js:87:13)
node-pre-gyp 错误!堆栈在 ChildProcess.emit (events.js:172:7)
node-pre-gyp 错误!堆栈在 maybeClose (internal/child_process.js:829:16)
node-pre-gyp 错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp 错误!系统 Linux 4.4.30+
node-pre-gyp 错误!命令“/usr/local/bin/node”“/usr/local/lib/node_modules/cncjs/node_modules/serialport/node_modules/.bin/node-pre-gyp”“安装”“–fallback-to-build”
node-pre-gyp 错误!cwd /usr/local/lib/node_modules/cncjs/node_modules/serialport
install: info lifecycle serialport@4.0.6~install: 执行安装脚本失败
node-pre-gyp 错误!node-pre-gyp -v v0.6.31
node-pre-gyp 错误!不好
似乎只是在下一步超时……
有什么问题还是我做错了什么?