node.js - centos6.8使用NVM安装nodejs,之后每次都提示/usr/bin/which: no node in...
黄舟
黄舟 2017-04-17 15:58:46
0
1
1147
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
Peter_Zhu

Because nvm installs node in the subdirectory versions of the .nvm folder in the user's home directory, the path of the node is not added to the PATH
So when executing which node, /usr/bin/which: no node in will appear (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

You only need to add the path to the directory where the node is located to PATH before executing which node.
The which node command may be executed by nvm.
The purpose may be to determine whether the node has been added to the environment variable. If not, add it.
You can execute echo $PATH to see if the path to the directory where the node is located is in it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!