node.js - 在红帽上安装 nodejs

标签 node.js redhat yum

我正在尝试使用以下命令在 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

https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#enterprise-linux-and-fedora

关于node.js - 在红帽上安装 nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27778593/

相关文章:

linux - 在 AWS linux 上通过 yum 安装 MongoDB 失败 : HTTPS Error 404 - Not Found

javascript - 找不到模块 : Error: Can't resolve 'vue-confirm-dialog'

node.js - 在 puppeteer Node.js 中获取 href 属性

javascript - npm 运行 html-webpack-plugin 的构建错误

php - 编译安装php5.4,make : *** [libphp5. la] 错误1

centos - 如何编写需要 sl-release 或 centos-release 或 redhat-release 的 .spec 文件?

python - 使用 --downloadonly 使用 Python Yum API 安装 RPM 包

javascript - 如何向本地服务器发出 'Post' 请求?

c++ - 如何检查进程是否在 Red Hat Linux 上运行?

perl - 庆典 : cpan: command not found