寫在前面題主剛剛接觸 NodeJS,對 Linux 也不是很熟,問題如有犯低級錯誤望見諒,同時希望大家指出。過程描述題主用的是阿里云的 ECS,以下是安裝步驟:安裝EPEL:rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm導入key:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6添加remi源:rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm導入key:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi設置 nodesource 源:curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -安裝nodejsyum -y install nodejs這個是正常的完整步驟,但是在第5.步的時候出了一點小差錯。由于是從 這篇Blog 中復制出來的,所以忘記修改版本了,執行的是 curl --silent --location https://rpm.nodesource.com/setup_5.x | bash - 這句指令。這導致我執行 yum -y install nodejs 安裝的是 v5.12.0 版本。嘗試了重新執行 curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -,但是執行 yum -y install nodejs 時會報錯,報錯信息如下:報錯信息文字版:我的問題:應該如何修改才能正常安裝 v4.x 版本的NodeJS?curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -這句命令中的 | bash - 起到什么作用?
求助 CentOS 安裝 NodeJS 遇到的問題? ???
慕田峪7331174
2018-11-06 13:14:39