无法在 Centos 7(64 位)上使用 epel repo 安装 nginx

Adi*_*a K 5 nginx centos

我刚刚构建了一个 64 位 Centos 服务器,我正在尝试在其上安装 NGINX。使用 epel 7(测试版)repo 尝试安装时出现以下错误:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.as29550.net
 * epel: mirror.vorboss.net
 * extras: centos.hyve.com
 * updates: centos.mirroring.pulsant.co.uk
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.0.15-5.el6 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: nginx-1.0.15-5.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: nginx-1.0.15-5.el6.x86_64
--> Finished Dependency Resolution
Error: Package: nginx-1.0.15-5.el6.x86_64 (epel)
           Requires: libpcre.so.0()(64bit)
Error: Package: nginx-1.0.15-5.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
Run Code Online (Sandbox Code Playgroud)

有没有人通过 yum 成功安装 NGINX?

小智 7

我建议添加 nginx repo

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Run Code Online (Sandbox Code Playgroud)

那应该可以解决您的问题。

干杯。


Gio*_*oni 5

这似乎不对,因为 RHEL7 x86_64 的 EPEL 存储库中的 nginx 版本是1.6.1

尝试yum clean all; yum update并重复安装过程。如果仍然失败,请尝试指定不同的镜像(因为您使用的镜像似乎不同步)。