2016-08-19 50 views
1

安裝節點我試圖使用這些instrcutions在CentOS 6.8安裝的NodeJS:在CentOS 6.8

http://tecadmin.net/install-latest-nodejs-and-npm-on-centos/#

當我運行 yum install nodejs

,但我得到了以下錯誤

Resolving Dependencies 
--> Running transaction check 
---> Package nodejs.x86_64 0:5.12.0-1nodesource.el7.centos will be installed 
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 
--> Finished Dependency Resolution 
Error: Package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 (nodesource) 
     Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) 
Error: Package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 (nodesource) 
     Requires: libc.so.6(GLIBC_2.15)(64bit) 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

回答

2

也許您需要安裝gcc-C++並在使用yum安裝nodejs之前進行安裝。

試試這個:

$ yum install -y gcc-c++ make

$ curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -

然後:

$ yum install nodejs

,並確認它使用:

http://tecadmin.net/install-latest-nodejs-and-npm-on-centos/

+0

這句話雖然從理論上回答這個問題,[但最好](/ /meta.stackoverflow.com/q/8259)在這裏包含答案的重要部分,並提供供參考的鏈接。 – manetsus

+0

非常感謝您提醒我關於我的答案,我真的不知道,但我編輯了它。 我希望它現在可以:) – cstipkovic

+0

我按照這些說明,當我得到這個錯誤,我應該把更多的信息在問題對不起 –

1

嘗試安裝:

yum clean all 
rm -rf /var/cache/yum/* 
yum update 

我的問題是在緩存的軟件包...