Centos 6.5 YUM报错并安装nginx

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库

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

猫咪没有Fish

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值