node.js - 我可以在 CentOS 6x 上安装 nodejs v.8.12 吗?
问题描述
现在我面临在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。
解决方案
您可以安装nvm
然后下载 Nodejs 8x 并使用它。
推荐阅读
- database - 如何在elasticsearch的内部对象中获取与指定术语匹配的文档?
- node.js - Chart.js 与 Node.js
- python - HTTP 错误 429 请求过多 - 删除 cookie
- embedded - 错误:为 ATmega328P-XMINI 配置 avrdude(我认为作恶者是)->(avrdude:usbdev_send():写了 7 个字节中的 -5,err = 输入/输出错误)
- c - 什么是 int a=(i*+3); 以及c编译器将如何执行它?
- php - 使用删除按钮截断表格
- django - 为什么 Django ORM 需要 all() 用于 filter() 而不是 order_by()?
- c# - 在 C# 中读取和处理远程压缩的 xml 文件
- java - Hamcrest 匹配器检查响应 json 数组中的任何元素是否具有与 Rest Assured 中的特定值相同的属性值
- python - TypeError:'key' 是此函数用于排序图像的无效关键字参数