简体   繁体   English

使用npm更新linux(yocto)上的nodejs

[英]updating nodejs on linux (yocto) using npm

I need to update my nodejs on a linux-Yocto OS, using npm here what I've tried : 我需要在Linux-Yocto操作系统上使用npm在我尝试过的操作系统上更新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

Does anyone know what I'm missing here ? 有人知道我在这里想念的吗?

thanks in advance ! 提前致谢 !

Sounds very much like this n thing relies on the node binary being located at /usr/local/bin/node , which does not hold true for a distribution level install as suggested by the FHS and carried out by yocto. 听起来很像, n依赖于位于/usr/local/bin/node的节点二进制文件,对于FHS建议的,由yocto执行的发行版安装,这并不适用。

While you might maybe fix this with tinkering, the Yocto-style way would be to update the recipe that builds nodejs in the first place to the desired version and then revuild the image altogether. 尽管您可以通过修补来解决此问题,但Yocto风格的方法是将首先构建nodejs的配方更新为所需版本,然后完全删除该映像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM