gpt4 book ai didi

node.js - 我可以在 CentOS 6x 上安装 nodejs v.8.12 吗?

转载 作者:太空宇宙 更新时间:2023-11-04 01:42:38 25 4
gpt4 key购买 nike

现在我面临着在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 并使用它。

关于node.js - 我可以在 CentOS 6x 上安装 nodejs v.8.12 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52417587/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com