gpt4 book ai didi

node.js - 使用 npm 在 linux (yocto) 上更新 nodejs

转载 作者:太空宇宙 更新时间:2023-11-04 09:59:10 25 4
gpt4 key购买 nike

我需要使用 npm 在 linux-Yocto 操作系统上更新我的 nodejs这是我试过的:

npm cache clean -f
npm install -g n
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
/usr/lib
`-- n@6.0.1

n stable

cp: cannot stat '/usr/local/n/versions/node/10.16.3/lib': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/10.16.3/bin': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/10.16.3/include': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/10.16.3/share': No such file or directory
/usr/bin/n: line 545: /usr/local/bin/node: No such file or directory

有谁知道我在这里缺少什么?

提前致谢!

最佳答案

听起来很像 n 依赖于位于 /usr/local/bin/node 的 Node 二进制文件,这对于分发级别不成立按照 FHS 的建议安装并由 yocto 执行。

虽然您可能会通过修补来解决此问题,但 Yocto 风格的方法是首先将构建 nodejs 的配方更新为所需版本,然后再重新生成图像。

关于node.js - 使用 npm 在 linux (yocto) 上更新 nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57710749/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com