尝试在 Centos 6 上从 EPEL 安装 Nginx 时缺少上述依赖项。
我复制了下面的 outbpt:
# yum install nginx
Loaded plugins: fastestmirror, priorities, replace, security
Setting up Install Process
Determining fastest mirrors
epel/metalink | 25 kB 00:00
* epel: mirror.netweaver.uk
* extras: ftp.heanet.ie
* updates: ftp.heanet.ie
epel | 4.7 kB 00:00
epel/primary_db | 6.0 MB 00:01
epel-httpd24 | 2.9 kB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 28 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.2 MB 00:00
22 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: nginx-all-modules = 1.10.2-1.el6 for package: nginx-1.10.2-1.el6.x86_64
--> Processing Dependency: nginx-filesystem = 1.10.2-1.el6 for package: nginx-1.10.2-1.el6.x86_64
--> Processing Dependency: nginx-filesystem for package: nginx-1.10.2-1.el6.x86_64
--> Running transaction check
---> Package nginx-all-modules.noarch 0:1.10.2-1.el6 will be installed
--> Processing Dependency: nginx-mod-http-geoip = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
--> Processing Dependency: nginx-mod-http-image-filter = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
--> Processing Dependency: nginx-mod-http-perl = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
--> Processing Dependency: nginx-mod-http-xslt-filter = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
--> Processing Dependency: nginx-mod-mail = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
--> Processing Dependency: nginx-mod-stream = 1.10.2-1.el6 for package: nginx-all-modules-1.10.2-1.el6.noarch
---> Package nginx-filesystem.noarch 0:1.10.2-1.el6 will be installed
--> Running transaction check
---> Package nginx-mod-http-geoip.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: GeoIP for package: nginx-mod-http-geoip-1.10.2-1.el6.x86_64
--> Processing Dependency: libGeoIP.so.1()(64bit) for package: nginx-mod-http-geoip-1.10.2-1.el6.x86_64
---> Package nginx-mod-http-image-filter.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: gd for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
---> Package nginx-mod-http-perl.x86_64 0:1.10.2-1.el6 will be installed
---> Package nginx-mod-http-xslt-filter.x86_64 0:1.10.2-1.el6 will be installed
---> Package nginx-mod-mail.x86_64 0:1.10.2-1.el6 will be installed
---> Package nginx-mod-stream.x86_64 0:1.10.2-1.el6 will be installed
--> Running transaction check
---> Package GeoIP.x86_64 0:1.6.5-1.el6 will be installed
--> Processing Dependency: GeoIP-data for package: GeoIP-1.6.5-1.el6.x86_64
--> Processing Dependency: geoipupdate for package: GeoIP-1.6.5-1.el6.x86_64
---> Package nginx-mod-http-image-filter.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: gd for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Running transaction check
---> Package GeoIP-GeoLite-data.noarch 0:2018.04-1.el6 will be installed
--> Processing Dependency: GeoIP-GeoLite-data-extra = 2018.04-1.el6 for package: GeoIP-GeoLite-data-2018.04-1.el6.noarch
---> Package geoipupdate.x86_64 0:3.1.1-2.el6 will be installed
---> Package nginx-mod-http-image-filter.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: gd for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Running transaction check
---> Package GeoIP-GeoLite-data-extra.noarch 0:2018.04-1.el6 will be installed
---> Package nginx-mod-http-image-filter.x86_64 0:1.10.2-1.el6 will be installed
--> Processing Dependency: gd for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64 (epel)
Requires: gd
Error: Package: nginx-mod-http-image-filter-1.10.2-1.el6.x86_64 (epel)
Requires: libgd.so.2()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
将我的评论变成答案,因为它似乎已经解决了OP的问题。
这gd-2.0.35-11.el6.x86_64.rpm与 OP 系统(CentOS 6、x86-64)相对应的软件包可在 CentOS 6 的“base”存储库中找到。
yum
问题中显示的输出显示正在为所有启用的存储库下载和缓存存储库数据。此列表中不存在“base”存储库。因此,“基础”存储库很可能在 OP 系统上被禁用。
CentOS-Base.repo
可以通过编辑目录下的文件/etc/yum.repos.d
并设置参数来重新启用“base”存储库enabled = 1
。
这也可以通过使用该工具以更直接的方式完成yum-config-manager
。只需运行命令yum-config-manager --enable base
即可启用存储库。