在Centos 6.8上安装Node
我试图在Centos 6.8上使用这些命令安装nodejs:
当我运行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
也许你需要安装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
并确认使用:
$ node -v
http://tecadmin.net/install-latest-nodejs-and-npm-on-centos/
安装前尝试一下:
yum clean all rm -rf /var/cache/yum/* yum update
我的问题是在caching包…