![]() This will take care of the problem now you can install packages using sudo like normal. sudo yum install nodejs Once again, you can check that the installation was successful by asking Node to return its version number: node -version v0.10.30 Many people will also want access to npm to manage their Node packages. ![]() To make this change you must use visudo to change the line Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin. This is easy to fix if you have root access on your server, WARNING: this may make sudo less secure, so make sure you understand your system and it’s security needs before changing this. This is a problem because npm is installed in /usr/local/bin by default and sudo does not have access to that location in it’s path. On CentOS 6.2 (and probably versions less than this), sudo has a secure path set secure_path = /sbin:/bin:/usr/sbin:/usr/bin. To install node packages you have a little problem if you are using sudo. Problem installing node packages with sudo Sudo yum groupinstall 'Development Tools' ![]() If you haven’t already installed developer tools, you will need to do that now. After, the following command can be run to verify Node.js is installed and which version of 14 is installed. And since I want to manage node packages during the development I also need to install the npm package manager for Node. The install of Node.js is pretty straight forward, with on gotcha when it comes to installing node packages that I will detail at the end. Now use the yum command to install Node.js. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |