最近,在阿里云的一台机子安装svn时,提示"Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"

# yum install -y subversion
Loaded plugins: fastestmirror
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.7.14-14.el7 will be installed
--> Processing Dependency: subversion-libs(x86-64) = 1.7.14-14.el7 for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_wc-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_subr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_repos-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_svn-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_neon-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_local-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_util-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_base-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_diff-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_delta-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_client-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libneon.so.27()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package neon.x86_64 0:0.30.0-3.el7 will be installed
--> Processing Dependency: libgnutls.so.28(GNUTLS_2_12)(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libgnutls.so.28(GNUTLS_1_4)(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libproxy.so.1()(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libgnutls.so.28()(64bit) for package: neon-0.30.0-3.el7.x86_64
---> Package subversion-libs.x86_64 0:1.7.14-14.el7 will be installed
--> Running transaction check
---> Package gnutls.x86_64 0:3.3.26-9.el7 will be installed
--> Processing Dependency: trousers >= 0.3.11.2 for package: gnutls-3.3.26-9.el7.x86_64
--> Processing Dependency: libnettle.so.4()(64bit) for package: gnutls-3.3.26-9.el7.x86_64
--> Processing Dependency: libhogweed.so.2()(64bit) for package: gnutls-3.3.26-9.el7.x86_64
---> Package libproxy.x86_64 0:0.4.11-11.el7 will be installed
--> Processing Dependency: libmodman.so.1()(64bit) for package: libproxy-0.4.11-11.el7.x86_64
---> Package pakchois.x86_64 0:0.4-10.el7 will be installed
--> Running transaction check
---> Package libmodman.x86_64 0:2.0.1-8.el7 will be installed
---> Package nettle.x86_64 0:2.7.1-8.el7 will be installed
---> Package trousers.x86_64 0:0.3.14-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================
 Package                         Arch                   Version                          Repository            Size
====================================================================================================================
Installing:
 subversion                      x86_64                 1.7.14-14.el7                    base                 1.0 M
Installing for dependencies:
 apr                             x86_64                 1.4.8-3.el7_4.1                  base                 103 k
 apr-util                        x86_64                 1.5.2-6.el7                      base                  92 k
 gnutls                          x86_64                 3.3.26-9.el7                     base                 677 k
 libmodman                       x86_64                 2.0.1-8.el7                      base                  28 k
 libproxy                        x86_64                 0.4.11-11.el7                    base                  64 k
 neon                            x86_64                 0.30.0-3.el7                     base                 165 k
 nettle                          x86_64                 2.7.1-8.el7                      base                 327 k
 pakchois                        x86_64                 0.4-10.el7                       base                  14 k
 subversion-libs                 x86_64                 1.7.14-14.el7                    base                 922 k
 trousers                        x86_64                 0.3.14-2.el7                     base                 289 k

Transaction Summary
====================================================================================================================
Install  1 Package (+10 Dependent packages)

Total download size: 3.6 M
Installed size: 12 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
apr-1.4.8-3.el7_4.1.x86_64.rpm FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/apr-1.4.8-3.el7_4.1.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
apr-util-1.5.2-6.el7.x86_64.rp FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/apr-util-1.5.2-6.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
gnutls-3.3.26-9.el7.x86_64.rpm FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/gnutls-3.3.26-9.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
libmodman-2.0.1-8.el7.x86_64.r FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/libmodman-2.0.1-8.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
libproxy-0.4.11-11.el7.x86_64. FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/libproxy-0.4.11-11.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
neon-0.30.0-3.el7.x86_64.rpm   FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/neon-0.30.0-3.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
nettle-2.7.1-8.el7.x86_64.rpm  FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/nettle-2.7.1-8.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
pakchois-0.4-10.el7.x86_64.rpm FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/pakchois-0.4-10.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
subversion-1.7.14-14.el7.x86_6 FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/subversion-1.7.14-14.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
subversion-libs-1.7.14-14.el7. FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/subversion-libs-1.7.14-14.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
trousers-0.3.14-2.el7.x86_64.r FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/trousers-0.3.14-2.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.


Error downloading packages:
  neon-0.30.0-3.el7.x86_64: [Errno 256] No more mirrors to try.
  trousers-0.3.14-2.el7.x86_64: [Errno 256] No more mirrors to try.
  libmodman-2.0.1-8.el7.x86_64: [Errno 256] No more mirrors to try.
  subversion-1.7.14-14.el7.x86_64: [Errno 256] No more mirrors to try.
  libproxy-0.4.11-11.el7.x86_64: [Errno 256] No more mirrors to try.
  pakchois-0.4-10.el7.x86_64: [Errno 256] No more mirrors to try.
  apr-1.4.8-3.el7_4.1.x86_64: [Errno 256] No more mirrors to try.
  nettle-2.7.1-8.el7.x86_64: [Errno 256] No more mirrors to try.
  gnutls-3.3.26-9.el7.x86_64: [Errno 256] No more mirrors to try.
  apr-util-1.5.2-6.el7.x86_64: [Errno 256] No more mirrors to try.
  subversion-libs-1.7.14-14.el7.x86_64: [Errno 256] No more mirrors to try.

经过查询资料得知,mirrors.cloud.aliyuncs.com是阿里云ECS VPC 用户专用的镜像源域名。
那不能说停就停吧?如果停了对阿里云上所有的ECS应该都会有很大影响。
然后换了另外一台阿里云的机器测试,发现另一台服务也是用的这个镜像源域名,但是却使用正常。

再排查机器配置,发现DNS不一样
问题机器的DNS是223.5.5.5223.6.6.6
正常机器的DNS是100.100.2.136100.100.2.138

最后修改DNS为正常机器的

# cat /etc/resolv.conf
nameserver 100.100.2.136
nameserver 100.100.2.138

再重新执行安装,就正常安装了

# yum install -y subversion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.7.14-14.el7 will be installed
--> Processing Dependency: subversion-libs(x86-64) = 1.7.14-14.el7 for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_wc-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_subr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_repos-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_svn-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_neon-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra_local-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_ra-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_util-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs_base-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_diff-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_delta-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libsvn_client-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libneon.so.27()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package neon.x86_64 0:0.30.0-3.el7 will be installed
--> Processing Dependency: libgnutls.so.28(GNUTLS_2_12)(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libgnutls.so.28(GNUTLS_1_4)(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libproxy.so.1()(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.30.0-3.el7.x86_64
--> Processing Dependency: libgnutls.so.28()(64bit) for package: neon-0.30.0-3.el7.x86_64
---> Package subversion-libs.x86_64 0:1.7.14-14.el7 will be installed
--> Running transaction check
---> Package gnutls.x86_64 0:3.3.29-9.el7_6 will be installed
--> Processing Dependency: trousers >= 0.3.11.2 for package: gnutls-3.3.29-9.el7_6.x86_64
--> Processing Dependency: libnettle.so.4()(64bit) for package: gnutls-3.3.29-9.el7_6.x86_64
--> Processing Dependency: libhogweed.so.2()(64bit) for package: gnutls-3.3.29-9.el7_6.x86_64
---> Package libproxy.x86_64 0:0.4.11-11.el7 will be installed
--> Processing Dependency: libmodman.so.1()(64bit) for package: libproxy-0.4.11-11.el7.x86_64
---> Package pakchois.x86_64 0:0.4-10.el7 will be installed
--> Running transaction check
---> Package libmodman.x86_64 0:2.0.1-8.el7 will be installed
---> Package nettle.x86_64 0:2.7.1-8.el7 will be installed
---> Package trousers.x86_64 0:0.3.14-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================
 Package                                   Arch                             Version                                    Repository                         Size
===============================================================================================================================================================
Installing:
 subversion                                x86_64                           1.7.14-14.el7                              base                              1.0 M
Installing for dependencies:
 apr                                       x86_64                           1.4.8-3.el7_4.1                            base                              103 k
 apr-util                                  x86_64                           1.5.2-6.el7                                base                               92 k
 gnutls                                    x86_64                           3.3.29-9.el7_6                             updates                           680 k
 libmodman                                 x86_64                           2.0.1-8.el7                                base                               28 k
 libproxy                                  x86_64                           0.4.11-11.el7                              base                               64 k
 neon                                      x86_64                           0.30.0-3.el7                               base                              165 k
 nettle                                    x86_64                           2.7.1-8.el7                                base                              327 k
 pakchois                                  x86_64                           0.4-10.el7                                 base                               14 k
 subversion-libs                           x86_64                           1.7.14-14.el7                              base                              922 k
 trousers                                  x86_64                           0.3.14-2.el7                               base                              289 k

Transaction Summary
===============================================================================================================================================================
Install  1 Package (+10 Dependent packages)

Total download size: 3.6 M
Installed size: 12 M
Downloading packages:
(1/11): apr-1.4.8-3.el7_4.1.x86_64.rpm                                                                                                  | 103 kB  00:00:00
(2/11): libmodman-2.0.1-8.el7.x86_64.rpm                                                                                                |  28 kB  00:00:00
(3/11): libproxy-0.4.11-11.el7.x86_64.rpm                                                                                               |  64 kB  00:00:00
(4/11): apr-util-1.5.2-6.el7.x86_64.rpm                                                                                                 |  92 kB  00:00:00
(5/11): neon-0.30.0-3.el7.x86_64.rpm                                                                                                    | 165 kB  00:00:00
(6/11): nettle-2.7.1-8.el7.x86_64.rpm                                                                                                   | 327 kB  00:00:00
(7/11): pakchois-0.4-10.el7.x86_64.rpm                                                                                                  |  14 kB  00:00:00
(8/11): gnutls-3.3.29-9.el7_6.x86_64.rpm                                                                                                | 680 kB  00:00:00
(9/11): subversion-1.7.14-14.el7.x86_64.rpm                                                                                             | 1.0 MB  00:00:00
(10/11): trousers-0.3.14-2.el7.x86_64.rpm                                                                                               | 289 kB  00:00:00
(11/11): subversion-libs-1.7.14-14.el7.x86_64.rpm                                                                                       | 922 kB  00:00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                           12 MB/s | 3.6 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : apr-1.4.8-3.el7_4.1.x86_64                                                                                                                 1/11
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                                                                2/11
  Installing : pakchois-0.4-10.el7.x86_64                                                                                                                 3/11
  Installing : nettle-2.7.1-8.el7.x86_64                                                                                                                  4/11
  Installing : libmodman-2.0.1-8.el7.x86_64                                                                                                               5/11
  Installing : libproxy-0.4.11-11.el7.x86_64                                                                                                              6/11
  Installing : trousers-0.3.14-2.el7.x86_64                                                                                                               7/11
  Installing : gnutls-3.3.29-9.el7_6.x86_64                                                                                                               8/11
  Installing : neon-0.30.0-3.el7.x86_64                                                                                                                   9/11
  Installing : subversion-libs-1.7.14-14.el7.x86_64                                                                                                      10/11
  Installing : subversion-1.7.14-14.el7.x86_64                                                                                                           11/11
  Verifying  : trousers-0.3.14-2.el7.x86_64                                                                                                               1/11
  Verifying  : libmodman-2.0.1-8.el7.x86_64                                                                                                               2/11
  Verifying  : neon-0.30.0-3.el7.x86_64                                                                                                                   3/11
  Verifying  : subversion-1.7.14-14.el7.x86_64                                                                                                            4/11
  Verifying  : subversion-libs-1.7.14-14.el7.x86_64                                                                                                       5/11
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                                                6/11
  Verifying  : nettle-2.7.1-8.el7.x86_64                                                                                                                  7/11
  Verifying  : pakchois-0.4-10.el7.x86_64                                                                                                                 8/11
  Verifying  : gnutls-3.3.29-9.el7_6.x86_64                                                                                                               9/11
  Verifying  : apr-1.4.8-3.el7_4.1.x86_64                                                                                                                10/11
  Verifying  : libproxy-0.4.11-11.el7.x86_64                                                                                                             11/11

Installed:
  subversion.x86_64 0:1.7.14-14.el7

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7_4.1                 apr-util.x86_64 0:1.5.2-6.el7        gnutls.x86_64 0:3.3.29-9.el7_6       libmodman.x86_64 0:2.0.1-8.el7
  libproxy.x86_64 0:0.4.11-11.el7              neon.x86_64 0:0.30.0-3.el7           nettle.x86_64 0:2.7.1-8.el7          pakchois.x86_64 0:0.4-10.el7
  subversion-libs.x86_64 0:1.7.14-14.el7       trousers.x86_64 0:0.3.14-2.el7

Complete!

标签: none

已有 2 条评论

  1. 碰到一样的问题了,阿里这太苟了

    1. jwj jwj

      就是得有个取舍了,如果想用阿里提供的镜像源,又想用第三方DNS的话,可以尝试将系统的yum源更换为阿里外网的公共镜像源或其它镜像源

添加新评论