我正在使用安装了 AlmaLinux v9.3.0 和 cPanel 120.0.1 的托管虚拟服务器。
它还安装了 EasyApache。
我正在尝试从 EPEL Repo 安装名为“mapserver”的软件包
运行命令
dnf install -y mapserver
我收到以下错误:-
Last metadata expiration check: 0:04:58 ago on Thu 11 Apr 2024 05:04:00 PM BST.
Error:
Problem: problem with installed package ea-apache24-2.4.59-1.1.1.cpanel.x86_64
- package ea-apache24-2.4.59-1.1.1.cpanel.x86_64 from @System conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package ea-apache24-2.4.58-1.1.5.cpanel.x86_64 from EA4-c9 conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package ea-apache24-2.4.58-1.1.6.cpanel.x86_64 from EA4-c9 conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package ea-apache24-2.4.58-3.3.5.cpanel.x86_64 from EA4-c9 conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package ea-apache24-2.4.58-3.3.6.cpanel.x86_64 from EA4-c9 conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package ea-apache24-2.4.59-1.1.1.cpanel.x86_64 from EA4-c9 conflicts with httpd-mmn provided by httpd-core-2.4.57-5.el9.x86_64 from appstream
- package httpd-2.4.57-5.el9.x86_64 from appstream requires httpd-core = 2.4.57-5.el9, but none of the providers can be installed
- package mapserver-8.0.0-3.el9.x86_64 from epel requires httpd, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
系统已配置为启用以下存储库:-
dnf repolist enabled
repo id repo name
EA4-c9 EA4 ( EasyApache 4 - c9 )
appstream AlmaLinux 9 - AppStream
baseos AlmaLinux 9 - BaseOS
cpanel-addons-production-feed cPanel Addons Production Feed
cpanel-plugins cPanel Plugins project
crb AlmaLinux 9 - CRB
epel Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras AlmaLinux 9 - Extras
fortimonitor.repo FortiMonitor Repository
imunify360 EL-9 - Imunify360
imunify360-rollout-1 Imunify360 - Gradual Rollout Slot 1
imunify360-rollout-2 Imunify360 - Gradual Rollout Slot 2
imunify360-rollout-3 Imunify360 - Gradual Rollout Slot 3
imunify360-rollout-4 Imunify360 - Gradual Rollout Slot 4
imunify360-rollout-5 Imunify360 - Gradual Rollout Slot 5
imunify360-rollout-6 Imunify360 - Gradual Rollout Slot
imunify360-rollout-7 Imunify360 - Gradual Rollout Slot 7
imunify360-rollout-8 Imunify360 - Gradual Rollout Slot 8
kernelcare kernelcare
mysql-connectors-community MySQL Connectors Community
mysql-tools-community MySQL Tools Community
mysql80-community MySQL 8.0 Community Server
wp-toolkit-cpanel WP Toolkit for cPanel
wp-toolkit-thirdparties WP Toolkit third parties
地图服务器包有以下要求:-
dnf repoquery --requires mapserver
dejavu-sans-fonts
httpd
libc.so.6(GLIBC_2.34)(64bit)
libfcgi.so.0()(64bit)
libmapserver.so.2()(64bit)
rtld(GNU_HASH)
我不想删除/升级/等等 EasyApache 安装。
我试图理解“--nobest”建议选项的含义是什么?
这是否会忽略标准 Apache 和 Easy Apache 之间的冲突?
Mapserver 对“httpd”没有直接编译要求,尽管这可能来自该包可能使用的可选“FastCGI”库。
Mapserver 二进制文件是一个独立的二进制文件,可以通过非“FastCGI”使用,因此我认为不会使用任何可选的“FastCGI”功能。
有没有办法使用DNF安装而忽略“httpd”依赖?
我真的不想从源代码编译地图服务器以排除“FastCGI”支持。
答案1
您可以创建一个虚拟包来提供缺少的依赖项。我写了一个工具(很多很多年前),它使这变得相对容易:https://github.com/larsks/fakeprovide
安装脚本后,您可以运行:
fakeprovide httpd
这将生成类似的内容:
fakeprovide-httpd-20240411151453-1.fc39.noarch.rpm
该包提供指定的依赖项:
$ rpm -qp fakeprovide-httpd-20240411151453-1.fc39.noarch.rpm --provides
fakeprovide-httpd = 20240411151453-1.fc39
httpd
安装该软件包,然后您应该能够安装依赖于httpd
.
答案2
该问题是由于错误的“Easy Apache”包和错误的“Mapserver”包的组合造成的。
由软件包构建的 Mapserver 不需要“httpd”。仅当您启用非默认实验性“Apache 模块”时才需要“httpd”
我要使用的解决方案是使用 RPMSPEC
https://src.fedoraproject.org/rpms/mapserver/blob/epel9/f/mapserver.spec
删除以下行:-
Requires: httpd
BuildRequires: httpd-devel
并rpmbuild一个新版本的包。
我也提出了这个bughttps://bugzilla.redhat.com/show_bug.cgi?id=2274733希望能修复它。