简体   繁体   English

如何在CentOS 7.2上安装Nodejs 7.X?

[英]How to Install Nodejs 7.X on CentOS 7.2?

This is my CentOS Version 这是我的CentOS版本

在此处输入图片说明

I've tried the official guide to install nodejs 7.10 我已经尝试了官方指南来安装Node.js 7.10

and this is the result 这就是结果

在此处输入图片说明 在此处输入图片说明

how can I install v7.10? 如何安装v7.10?

I became a lot happier when I removed system nodejs and installed nvm: https://github.com/creationix/nvm 当我删除系统nodejs并安装nvm时,我变得更加快乐: https : //github.com/creationix/nvm

Then you can do something as simple as (assuming you do not need changes to your .bashrc/.bash_profile/or other shell config file for nvm to work correctly on your setup): 然后,您可以做一些简单的事情(假设您不需要更改.bashrc / .bash_profile /或其他shell配置文件,nvm就可以在您的设置上正常工作):

nvm install v7.10.0 && nvm use v7.10.0 && nvm alias default v7.10.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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