简体   繁体   中英

Installing Node and NPM in Linux

I've having troubles with npm in my Linux Fedora 27. After installing and reinstalling doing so many complex files movements, finally I made ir work. But for every npm update I have a new headache because always some file or directory haven't permission for write or something like that.

Since last node and npm update (8.10.0 and 5.7.1 respectivelly) I figured out that installing them as superuser ( $ su ) everything go right, but only under superuser level.

What can I do to use npm and node without problems as a common user?

Maybe it isn't nacessary change anything. I don't know what kind of problems can give me using my linux always as a superuser

I'm a relativelly new Linux User, so apologies by my noob concepts and supositions

Finally, I found a solution for my problem, but I think that besides is the best way for installing nodejs in Linux or Unix derivates:

https://github.com/creationix/nvm

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