2017-01-03 123 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

我該如何做到這一點,請提出建議。 –