今天在linux环境通过yum安装软件报了以下错误:
[root@localhost ~]
|
从字面意义上看是不能解析mirrorlist.centos.org这个地址,应该是跟dns网络配置有关系,最后解决方法是在DNS域名解析的配置文件增加DNS服务器的IP地址:
[root@localhost ~]
|
重启网络服务
[root@localhost ~]
|
重新yum安装,正常
[root@localhost ~]# yum -y install gcc
Loaded plugins: refresh-packagekit, security
Setting up Install Process
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 29 kB 00:00
updates | 3.4 kB 00:00
^Cupdates/primary_db 6% [= ] 15 kB/s | 769 kB 11:04 ETA
Current download cancelled, interrupt (ctrl-c) again within two seconds
to exit.
updates/primary_db | 11 MB 00:01
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-17.el6 will be updated
---> Package gcc.x86_64 0:4.4.7-23.el6 will be an update
--> Processing Dependency: libgomp = 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.x86_64
--> Running transaction check
|