所以这周发生了一些奇怪的事情,我不确定是不是只有我。当我从Marketplace ( EC2 7 (x86_64) )创建一个新的CentOS实例( CentOS 7(X86_64)-带有更新的CentOS)并试图安装nodejs时,我会得到nodejs包找不到的错误。当然,在安装nodejs之前,我正在安装epel发行版,因为nodejs是这个包的一部分。
错误输出如下:
[root@ip-172-31-15-245 centos]# yum install epel-release -y`
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: download.cf.centos.org
* extras: download.cf.centos.org
* updates: download.cf.centos.org
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): extras/7/x86_64/primary_db | 243 kB 00:00:00
(2/4): base/7/x86_64/group_gz | 153 kB 00:00:00
(3/4): updates/7/x86_64/primary_db | 13 MB 00:00:00
(4/4): base/7/x86_64/primary_db | 6.1 MB 00:00:01
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Downloading packages:
warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for epel-release-7-11.noarch.rpm is not installed
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-7.1908.0.el7.centos.x86_64 (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
`[root@ip-172-31-15-245 centos]# yum install nodejs`
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 32 kB 00:00:00
* base: download.cf.centos.org
* epel: mirror.23m.com
* extras: download.cf.centos.org
* updates: download.cf.centos.org
epel | 4.7 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/3): epel/x86_64/group_gz | 96 kB 00:00:00
(3/3): epel/x86_64/primary_db | 7.0 MB 00:00:00
No package nodejs available.
Error: Nothing to do
Does anyone else experience the same issue?
Tried using nvm but does suit me so I'm looking for any advice?发布于 2022-01-22 05:10:11
其他一些用户在CentOS 7上使用EPEL和CentOS遇到了问题。您能下载tarball并尝试手动安装它吗(不过,我会使用默认用户帐户而不是root ):
注意事项-在CentOS 7.9上进行测试
wget https://nodejs.org/dist/latest/node-v17.4.0-linux-x64.tar.gz -P /home/<default user>/Downloads
cd /home/<default user>/Downloads
sudo tar -C /usr/local --strip-components 1 -xzf node*.tar.gzhttps://stackoverflow.com/questions/70805081
复制相似问题