10. yum安装报错及解决办法
10.1. yum安装https的在线软件包报错
错误现象:
1[root@zzjlogin ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
2Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
3curl: (60) Peer certificate cannot be authenticated with known CA certificates
4More details here: http://curl.haxx.se/docs/sslcerts.html
5
6curl performs SSL certificate verification by default, using a "bundle"
7of Certificate Authority (CA) public keys (CA certs). If the default
8bundle file isn't adequate, you can specify an alternate file
9using the --cacert option.
10If this HTTPS server uses a certificate signed by a CA represented in
11the bundle, the certificate verification probably failed due to a
12problem with the certificate (it might be expired, or the name might
13not match the domain name in the URL).
14If you'd like to turn off curl's verification of the certificate, use
15the -k (or --insecure) option.
16error: skipping https://mirror.webtatic.com/yum/el6/latest.rpm - transfer failed
- 原因:
上面显示内容提示https需要证书,所以可以用http代替https。
解决:
1[root@zzjlogin ~]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
2Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm
3warning: /var/tmp/rpm-tmp.ZS63LO: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
4 Preparing... ########################################### [100%]
5 1:webtatic-release ########################################### [100%]
10.2. 14: Peer cert cannot be verified or peer cert invalid
错误现象:
[root@zzjlogin ~]# yum install php56w -y 已加载插件:fastestmirror, security 设置安装进程 Determining fastest mirrors Could not retrieve mirrorlist https://mirror.webtatic.com/yum/el6/x86_64/mirrorlist error was 14: Peer cert cannot be verified or peer cert invalid 错误:Cannot find a valid baseurl for repo: webtatic
- 原因:
系统时间和当前时间不一致导致的不能安装。
解决:
1[root@zzjlogin ~]# date
22018年 09月 06日 星期四 21:07:01 CST
3[root@zzjlogin ~]# ntpdate pool.ntp.org
46 Sep 21:07:10 ntpdate[1583]: 80.65.85.94 rate limit response from server.
527 Sep 13:37:16 ntpdate[1583]: step time server 85.199.214.98 offset 1787405.299392 sec
6[root@zzjlogin ~]# date
72018年 09月 27日 星期四 13:37:18 CST
8[root@zzjlogin ~]# yum install php56w -y
9已加载插件:fastestmirror, security
10设置安装进程
11Determining fastest mirrors
12* base: mirrors.tuna.tsinghua.edu.cn
13* extras: mirrors.tuna.tsinghua.edu.cn
14* updates: mirrors.tuna.tsinghua.edu.cn
15* webtatic: sp.repo.webtatic.com
16base | 3.7 kB 00:00
17extras | 3.4 kB 00:00
18extras/primary_db | 26 kB 00:00
19updates | 3.4 kB 00:00
20updates/primary_db | 1.2 MB 00:00
21webtatic | 3.6 kB 00:00
22webtatic/primary_db | 443 kB 00:00
23解决依赖关系
24--> 执行事务检查
25---> Package php56w.x86_64 0:5.6.38-1.w6 will be 安装
26--> 处理依赖关系 php56w-common(x86-64) = 5.6.38-1.w6,它被软件包 php56w-5.6.38-1.w6.x86_64 需要
27--> 处理依赖关系 php56w-cli(x86-64) = 5.6.38-1.w6,它被软件包 php56w-5.6.38-1.w6.x86_64 需要
28--> 处理依赖关系 php56w-cli = 5.6.38-1.w6,它被软件包 php56w-5.6.38-1.w6.x86_64 需要
29--> 处理依赖关系 httpd-mmn = 20051115,它被软件包 php56w-5.6.38-1.w6.x86_64 需要
30--> 处理依赖关系 httpd,它被软件包 php56w-5.6.38-1.w6.x86_64 需要
31--> 执行事务检查
32---> Package httpd.x86_64 0:2.2.15-69.el6.centos will be 安装
33--> 处理依赖关系 httpd-tools = 2.2.15-69.el6.centos,它被软件包 httpd-2.2.15-69.el6.centos.x86_64 需要
34--> 处理依赖关系 apr-util-ldap,它被软件包 httpd-2.2.15-69.el6.centos.x86_64 需要
35---> Package php56w-cli.x86_64 0:5.6.38-1.w6 will be 安装
36---> Package php56w-common.x86_64 0:5.6.38-1.w6 will be 安装
37--> 执行事务检查
38---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be 安装
39---> Package httpd-tools.x86_64 0:2.2.15-69.el6.centos will be 安装
40--> 完成依赖关系计算
41
42依赖关系解决
43
44=============================================================================================================================================================================
45软件包 架构 版本 仓库 大小
46=============================================================================================================================================================================
47正在安装:
48php56w x86_64 5.6.38-1.w6 webtatic 2.7 M
49为依赖而安装:
50apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k
51httpd x86_64 2.2.15-69.el6.centos base 836 k
52httpd-tools x86_64 2.2.15-69.el6.centos base 81 k
53php56w-cli x86_64 5.6.38-1.w6 webtatic 2.6 M
54php56w-common x86_64 5.6.38-1.w6 webtatic 1.2 M
55
56事务概要
57=============================================================================================================================================================================
58Install 6 Package(s)
59
60总下载量:7.4 M
61Installed size: 28 M
62下载软件包:
63(1/6): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm | 15 kB 00:00
64(2/6): httpd-2.2.15-69.el6.centos.x86_64.rpm | 836 kB 00:00
65(3/6): httpd-tools-2.2.15-69.el6.centos.x86_64.rpm | 81 kB 00:00
66(4/6): php56w-5.6.38-1.w6.x86_64.rpm | 2.7 MB 00:05
67(5/6): php56w-cli-5.6.38-1.w6.x86_64.rpm | 2.6 MB 00:08
68(6/6): php56w-common-5.6.38-1.w6.x86_64.rpm | 1.2 MB 00:03
69-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
70总计 438 kB/s | 7.4 MB 00:17
71warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
72Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el6
73Importing GPG key 0xCF4C4FF9:
74Userid : Webtatic EL6 <el6@webtatic.com>
75Package: webtatic-release-6-9.noarch (installed)
76From : /etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el6
77运行 rpm_check_debug
78执行事务测试
79事务测试成功
80执行事务
81Warning: RPMDB altered outside of yum.
82正在安装 : php56w-common-5.6.38-1.w6.x86_64 1/6
83正在安装 : php56w-cli-5.6.38-1.w6.x86_64 2/6
84正在安装 : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 3/6
85正在安装 : httpd-tools-2.2.15-69.el6.centos.x86_64 4/6
86正在安装 : httpd-2.2.15-69.el6.centos.x86_64 5/6
87正在安装 : php56w-5.6.38-1.w6.x86_64 6/6
88Verifying : httpd-tools-2.2.15-69.el6.centos.x86_64 1/6
89Verifying : php56w-common-5.6.38-1.w6.x86_64 2/6
90Verifying : httpd-2.2.15-69.el6.centos.x86_64 3/6
91Verifying : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 4/6
92Verifying : php56w-5.6.38-1.w6.x86_64 5/6
93Verifying : php56w-cli-5.6.38-1.w6.x86_64 6/6
94
95已安装:
96php56w.x86_64 0:5.6.38-1.w6
97
98作为依赖被安装:
99apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 httpd.x86_64 0:2.2.15-69.el6.centos httpd-tools.x86_64 0:2.2.15-69.el6.centos php56w-cli.x86_64 0:5.6.38-1.w6
100php56w-common.x86_64 0:5.6.38-1.w6
101
102完毕!