Skip to content
Advertisement

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 !

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement