虚拟机中yum报错
[root@localhost ~]# yum -y install oracle-rdbms-server-11gR2-preinstall Loaded plugins: langpacks, ulninfo Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el7 will be installed --> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el7.x86_64 --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el7.x86_64 ( many more lines suppressed ) compat-libstdc++-33-3.2.3-72.e FAILED https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/compat-libstdc%2B%2B-33-3.2.3-72.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error" Trying other mirror. compat-libcap1-1.10-7.el7.x86_ FAILED https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/compat-libcap1-1.10-7.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error" Trying other mirror. cpp-4.8.5-36.0.1.el7.x86_64.rp FAILED https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/cpp-4.8.5-36.0.1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"ETA Trying other mirror. warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/gcc-4.8.5-36.0.1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY ] 1.1 MB/s | 16 MB 00:00:36 ETA Public key for gcc-4.8.5-36.0.1.el7.x86_64.rpm is not installed (1/14): gcc-4.8.5-36.0.1.el7.x86_64.rpm | 16 MB 00:00:26 (2/14): gcc-c++-4.8.5-36.0.1.el7.x86_64.rpm | 7.2 MB 00:00:06 (3/14): glibc-2.17-260.0.15.el7_6.3.x86_64.rpm | 3.7 MB 00:00:03 (4/14): glibc-common-2.17-260.0.15.el7_6.3.x86_64.rpm | 12 MB 00:00:10 (5/14): glibc-devel-2.17-260.0.15.el7_6.3.x86_64.rpm | 1.1 MB 00:00:01 (6/14): glibc-headers-2.17-260.0.15.el7_6.3.x86_64.rpm | 685 kB 00:00:00 (7/14): kernel-headers-3.10.0-957.5.1.el7.x86_64.rpm | 8.0 MB 00:00:06 (8/14): ksh-20120801-139.0.1.el7.x86_64.rpm | 883 kB 00:00:00 (9/14): libaio-devel-0.3.109-13.el7.x86_64.rpm | 12 kB 00:00:00 (10/14): libstdc++-devel-4.8.5-36.0.1.el7.x86_64.rpm | 1.5 MB 00:00:01 (11/14): oracle-rdbms-server-11gR2-preinstall-1.0-6.el7.x86_64.rpm | 22 kB 00:00:00 Error downloading packages: cpp-4.8.5-36.0.1.el7.x86_64: [Errno 256] No more mirrors to try. compat-libcap1-1.10-7.el7.x86_64: [Errno 256] No more mirrors to try. compat-libstdc++-33-3.2.3-72.el7.x86_64: [Errno 256] No more mirrors to try. [root@localhost ~]#
出现这个的原因是虚拟机中的主机网关不能dns到,加8.8.8.8作为dns即可
[root@localhost ~]# vim /etc/resolv.conf # Generated by NetworkManager nameserver 192.0.1.2 nameserver 8.8.8.8
所有评论(0)