问题1
nginx下载源配置完毕,但是无法下载,出现报错。
[root@m01 ~]# yum install -y nginx
Loaded plugins: fastestmirror
Determining fastest mirrors
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: zabbix
问题原因:yum源文件存在问题,yum下载时,会遍历所有yum源,当有个yum源配置错误时,会影响到其他yum源的下载
解决办法:
向上文的错误,可以看出是zabbix源的配置错误.
问题2
[root@web1 ~]# yum install -y fping
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
http://mirrors.aliyun.com/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
One of the configured repositories failed (Extra Packages for Enterprise Linux 7 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=epel ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable epel
or
subscription-manager repos --disable=epel
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=epel.skip_if_unavailable=true
failure: repodata/repomd.xml from epel: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
产生原因:dns解析配置的不对,dns解析有三个地方:网卡配置文件,/etc/resolv.conf, /etc/hosts
问题3
问题:安装rpm安装包时,报错
[root@lb02 ~]# rpm -ihv zabbix-proxy-mysql-4.0.13-1.el7.x86_64_\(1\).rpm
warning: zabbix-proxy-mysql-4.0.13-1.el7.x86_64_(1).rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
error: Failed dependencies:
fping is needed by zabbix-proxy-mysql-4.0.13-1.el7.x86_64
libOpenIPMI.so.0()(64bit) is needed by zabbix-proxy-mysql-4.0.13-1.el7.x86_64
libOpenIPMIposix.so.0()(64bit) is needed by zabbix-proxy-mysql-4.0.13-1.el7.x86_64
libodbc.so.2()(64bit) is needed by zabbix-proxy-mysql-4.0.13-1.el7.x86_64
[root@lb02 ~]# rpm -ihv zabbix-proxy-mysql-4.0.13-1.el7.x86_64_\(1\).rpm
警告:zabbix代理- mysql 4.0.13 - 1. - el7.x86_64_ (1)。rpm: Header V4 RSA/SHA512签名,密钥ID a14fe591: NOKEY错误:失败的依赖:
zabbix-proxy-mysql-4.0.13-1.el7.x86_64需要fping
zabbix-proxy-mysql-4.0.13-1.el7.x86_64需要libOpenIPMI.so.0()(64位)
zabbix-proxy-mysql-4.0.13-1.el7.x86_64需要libOpenIPMIposix.so.0()(64位)
zabbix-proxy-mysql-4.0.13-1.el7.x86_64需要libodb .so.2()(64位)
产生原因:安装这个rpm安装包是,存在依赖问题,无法解决。
解决办法:利用yum localinstall 解决依赖问题。
[root@lb02 ~]# yum localinstall -y zabbix-proxy-mysql-4.0.13-1.el7.x86_64_\(1\).rpm
Loaded plugins: fastestmirror, priorities
Examining zabbix-proxy-mysql-4.0.13-1.el7.x86_64_(1).rpm: zabbix-proxy-mysql-4.0.13-1.el7.x86_64
Marking zabbix-proxy-mysql-4.0.13-1.el7.x86_64_(1).rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package zabbix-proxy-mysql.x86_64 0:4.0.13-1.el7 will be installed
--> Processing Dependency: fping for package: zabbix-proxy-mysql-4.0.13-1.el7.x86_64
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel | 5.3 kB 00:00:00
extras | 2.9 kB 00:00:00
http://10.0.0.61/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
..
..
..