问题描述:安装zabbix的时候 需要安装centos-release-scl
但是安装的时候提示如下
[root@localhost install_zabbix]# yum -y install centos-release-scl
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
No package centos-release-scl available.
Error: Nothing to do
系统信息:
[root@localhost install_zabbix]# uname -a
Linux 10-90-20-5 4.19.0-9.el7.ucloud.x86_64 #1 SMP Mon Sep 28 10:29:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost install_zabbix]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
可能原因:
- 原因一:可能是系统问题 如果不是x86_64的就是没有这个的
- 原因二:系统自带的yum源有问题
解决办法:
996 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
997 yum makecache fast
998 yum -y install centos-release-scl
成功的如下
[root@10-90-20-5 install_zabbix]# yum makecache fast
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
zabbix | 2.9 kB 00:00:00
zabbix-frontend | 2.9 kB 00:00:00
zabbix-non-supported | 2.9 kB 00:00:00
extras/7/x86_64/primary_db | 243 kB 00:00:00
Metadata Cache Created
[root@10-90-20-5 install_zabbix]# yum -y install centos-release-scl
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl.noarch 0:2-3.el7.centos will be installed
--> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-3.el7.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-3.el7.centos will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================
Installing:
centos-release-scl noarch 2-3.el7.centos extras 12 k
Installing for dependencies:
centos-release-scl-rh noarch 2-3.el7.centos extras 12 k
Transaction Summary
==================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 24 k
Installed size: 39 k
Downloading packages:
(1/2): centos-release-scl-2-3.el7.centos.noarch.rpm | 12 kB 00:00:00
centos-release-scl-rh-2-3.el7. FAILED
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection timed out"
Trying other mirror.
(2/2): centos-release-scl-rh-2-3.el7.centos.noarch.rpm | 12 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------
Total 7.4 kB/s | 24 kB 00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : centos-release-scl-rh-2-3.el7.centos.noarch 1/2
Installing : centos-release-scl-2-3.el7.centos.noarch 2/2
Verifying : centos-release-scl-2-3.el7.centos.noarch 1/2
Verifying : centos-release-scl-rh-2-3.el7.centos.noarch 2/2
Installed:
centos-release-scl.noarch 0:2-3.el7.centos
Dependency Installed:
centos-release-scl-rh.noarch 0:2-3.el7.centos
Complete!