yum仓库 Nginx 安装不了错误
今天在做yum仓库的时候,安装Nginx,出现下列错误: --> Finished Dependency Resolution Error: Package: nginx-1.10.2-1.el6.x86_64 (epel) Requires: libpcre.so.0()(64bit) Error: Package: nginx-mod-http-perl-1.10.2-1.el6.x86_64 (epel) Requires: perl(:MODULE_COMPAT_5.10.1) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 贴图: 以为是yum源出现了错误,于是使用下面命令更改了下yum源。 将yum源仓库移动到另外一个备份文件中 mv /etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup 将外国的yum源地址改为国内阿里yum源仓库,提高访问速度。 wget -O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo mv /etc/yum.repos.d/epel.repo/etc/yum.repos.d/epel.repo.backup mv /etc/yum.repos.d/epel-testing.repo/etc/yum.repos.d/epel-testing.repo.backup wget -O/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 修改完yum源后再次执行 yum install -y nginx ,结果还是一样的错误! 下面借鉴网络上的解决方法,结果解决了: 1.创建一个文件 /etc/yum.repos.d/nginx.repo,并将下面的内容复制进去: [nginx] name=nginxrepo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 在编辑这个文件时,没有对齐 2.编辑并保存/etc/yum.repos.d/nginx.repo文件后,在命令行下执行 [root@localhost~]#yumlist|grepnginxnginx.i3861.4.7-1.el6.ngx@nginx nginx-debug.i3861.4.7-1.el6.ngxnginx 会发现就是最新的稳定版 yum-yinstallnginx 再次安装Nginx后就正常了,出现了我们最喜欢的安装完成界面了。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |