Centos 6.5 YUM报错并安装nginx
[root@localhost ~]# yum install mtr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.cloud.aliyuncs.com'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
YUM 能用的源地址:http://mirrors.aliyun.com/centos-vault/6.5/os/x86_64/
把/etc/yum.repos.d/这个目录下的文件全部删掉
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-6
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.5/os/x86_64/
gpgcheck=0
[root@localhost ~]# yum install mtr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mtr.x86_64 2:0.75-5.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
mtr x86_64 2:0.75-5.el6 base 54 k
Transaction Summary
===========================================================================================================
Install 1 Package(s)
Total download size: 54 k
Installed size: 96 k
Is this ok [y/N]: y
Downloading Packages:
mtr-0.75-5.el6.x86_64.rpm | 54 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:mtr-0.75-5.el6.x86_64 1/1
Verifying : 2:mtr-0.75-5.el6.x86_64 1/1
Installed:
mtr.x86_64 2:0.75-5.el6
Complete!
Centos 6.5 更换YUM源成功。
安装nginx依赖如下安装包
yum install gcc #GCC——GNU编译器集合
yum install pcre pcre-devel #PCRE库
yum install zlib zlib-devel #zlib库
yum install openssl openssl-devel #OpenSSL库