2017-01-03 92 views
0

从最后4个小时我试图安装nodejs,我有一台linux机器。在Redhat的nodejs安装AWS

**$ 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 

回答

1

你的RHEL 5的旧Python版本。

运行python --version。您至少需要Python 2.7来安装该脚本,因此请首先更新您的Python。

+0

是的,我已经更新了, $ python --version Python 2.7.12 ----------------------------- 仍然会出现相同问题 $ sudo yum -y install nodejs 加载插件:安全 设置安装进程 没有可用的package nodejs。 没事做 –

+0

之后,我按照下面的步骤和其现在的工作.. wget - 无检查证书https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x64。 $ cd/usr/local/ $ sudo tar --strip-components 1 -xzf /home/hybris/nodeJs/node-v4.2.1-linux-x64.tar.gz $ node -v v4 .2.1 谢谢...... –

0

对于Node.js的V4 LTS氩:

卷曲--silent --location https://rpm.nodesource.com/setup_4.x |庆典 -

对于Node.js的V6:

卷曲--silent --location https://rpm.nodesource.com/setup_6.x |庆典 -

对于Node.js的0.10:

卷曲--silent --location https://rpm.nodesource.com/setup |庆典 -

和明年根:

百胜安装EPEL释放

百胜-y安装的NodeJS

+0

我已经完成了所有的搜索结果,出现错误。 $ yum -y install nodejs 加载插件:安全 设置安装进程 没有可用的package nodejs。 无事可做 –

+0

您需要更新您的知识库 –

+0

我该如何做到这一点,请提出建议。 –