【发布时间】:2019-02-24 07:41:42
【问题描述】:
现在我面临在 centOS 6.9 上安装 nodejs v.8.12 当我尝试安装 v8x 时,我只能获得 v6.12
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash
## Installing the NodeSource Node.js 8.x LTS Carbon repo...
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m
## Confirming "el6-x86_64" is supported...
+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_8.x/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'
## Downloading release setup RPM...
+ mktemp
+ curl -sL -o '/tmp/tmp.eY4nFtJJtc' 'https://rpm.nodesource.com/pub_8.x/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'
## Installing release setup RPM...
+ rpm -i --nosignature --force '/tmp/tmp.eY4nFtJJtc'
## Cleaning up...
+ rm -f '/tmp/tmp.eY4nFtJJtc'
## Checking for existing installations...
+ rpm -qa 'node|npm' | grep -v nodesource
## Run `sudo yum install -y nodejs` to install Node.js 8.x LTS Carbon and npm.
## You may also need development tools to build native addons:
sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
我刚刚按照他们的指示获取了 nodejs v8.x,
运行 sudo yum install -y nodejs 以安装 Node.js 8.x LTS Carbon 和 npm。
但仍然只能获得 6.14。
【问题讨论】: