redhat AWS 中的 nodejs 安装
nodejs installation in redhat AWS
从最近 4 小时开始,我正在尝试安装 nodejs,我有一台 linux 机器。
**$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)**
我已经下载了 nodeJs 安装程序,当我 运行 (./configure) 命令显示错误时。
$ ./configure
File "./configure", line 511
o['default_configuration'] = 'Debug' if options.debug else 'Release'
^
SyntaxError: invalid syntax
对于 Node.js v4 LTS Argon:
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
对于 Node.js v6:
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
对于Node.js 0.10:
curl --silent --location https://rpm.nodesource.com/setup | bash -
然后作为 root:
yum 安装 epel-release
yum -y 安装 nodejs
你的 RHEL 5 有旧的 Python 版本。
运行python --version
。您至少需要 Python 2.7 才能使安装脚本正常工作,因此请先更新您的 Python。
从最近 4 小时开始,我正在尝试安装 nodejs,我有一台 linux 机器。
**$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)**
我已经下载了 nodeJs 安装程序,当我 运行 (./configure) 命令显示错误时。
$ ./configure
File "./configure", line 511
o['default_configuration'] = 'Debug' if options.debug else 'Release'
^
SyntaxError: invalid syntax
对于 Node.js v4 LTS Argon:
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
对于 Node.js v6:
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
对于Node.js 0.10:
curl --silent --location https://rpm.nodesource.com/setup | bash -
然后作为 root:
yum 安装 epel-release
yum -y 安装 nodejs
你的 RHEL 5 有旧的 Python 版本。
运行python --version
。您至少需要 Python 2.7 才能使安装脚本正常工作,因此请先更新您的 Python。