我正在尝试使用以下命令在 Red Hat Enterprise Linux Server 6.1 版上安装 node.js:
sudo yum install nodejs npm
我收到以下错误:
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: nodejs-devel-0.10.24-1.el6.x86_64 (epel)
Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: nodejs-devel-0.10.24-1.el6.x86_64 (epel)
Requires: libssl.so.10(libssl.so.10)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我也尝试了以下命令:
sudo yum install -y nodejs
我收到以下错误:
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
我应该如何安装它?我想安装最新版本。
最佳答案
NodeJS 提供了一个安装脚本,在你用 yum 安装它之前必须运行它
curl -sL https://rpm.nodesource.com/setup | bash -
那么yum命令应该可以工作了
yum install -y nodejs
关于node.js - 在红帽上安装 nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27778593/