【发布时间】:2017-09-28 01:22:15
【问题描述】:
我尝试按照nodesource 上的说明以root 身份运行这些命令:
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs
但是当我之后运行node -v 时,我可以看到它只安装了 0.10.48。我可以在第二个命令的输出中看到它选择了错误的软件包版本进行下载:
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: mirror.steadfast.net
* remi: repo1.sea.innoscale.net
* remi-safe: repo1.sea.innoscale.net
2418 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.48-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================
Installing:
nodejs x86_64 0.10.48-3.el6 epel 2.1 M
Transaction Summary
=========================================================================================================================================================================================
Install 1 Package(s)
Total download size: 2.1 M
Installed size: 7.1 M
Downloading Packages:
nodejs-0.10.48-3.el6.x86_64.rpm | 2.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : nodejs-0.10.48-3.el6.x86_64 1/1
Verifying : nodejs-0.10.48-3.el6.x86_64 1/1
Installed:
nodejs.x86_64 0:0.10.48-3.el6
Complete!
我尝试使用yum remove -y nodejs npm 卸载,然后运行rm -fv /etc/yum.repos.d/nodesource*、yum clean all、yum update,然后重新安装,但似乎没有任何效果。
为什么不解析为 v8 包?
【问题讨论】: