简体   繁体   中英

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 :

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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