我在本地服务器上托管2个存储库(myrepo-main和AppStream)。 myrepo-main承载mysql商业rpm和一些其他软件包。除非我禁用AppStream存储库,否则大多数mysql软件包都不可见。
$ sudo dnf list | grep ^mysql
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
禁用AppStream存储库可让我查看存储库中的mysql软件包。
$ sudo dnf --disablerepo=AppStream --enablerepo=myrepo* list | grep ^mysql
mysql-commercial-client.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-common.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-server.x86_64 5.7.29-1.1.el7 myrepo-main
回购中的其他程序包在myrepo中可见,而没有禁用AppStream回购
$ sudo dnf list | grep myrepo
jre1.8.x86_64 1.8.0_211-fcs @myrepo-main
tomcat.x86_64 8.5.41-2 @myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
我已从客户端上的AppStream存储库中排除了mysql软件包。
[AppStream]
name=FW-CentOS-$releasever - AppStream
baseurl=http://192.168.20.230/repos/x86/8/AppStream/AppStream
gpgcheck=1
enabled=1
gpgkey=http://192.168.20.230/repos/x86/8/RPM-GPG-KEY-FWRepo
priority=98
exclude=mysql-server,mysql-common,mysql-devel,mysql-errmsg,mysql-libs,mysql-test,mysql,mariadb,mariadb-server
[myrepo-main]
name=MyRepo Main
baseurl=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/
enabled=1
gpgcheck=1
gpgkey=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/RPM-GPG-KEY-FWRepo
priority=1
我尝试过:
dnf clean all
rm -rf /var/cache/dnf/
我还尝试使用reposync创建不带元数据的AppStream,删除所有mysql rpm,并使用createrepo_c生成元数据。这使我可以看到myrepo中的mysql软件包,但是其他软件包在生成的元数据方面存在问题,因此无法安装。
我们的CentOS6主机具有类似的配置,可以正常工作。我怀疑这是dnf或AppStream的某些功能。
据我所知,这是必需的,因为EL8引入了新的模块系统。如果dnf检测到pgdg软件包提供的内容也包含在模块中,但本身未打包为适当的模块,则默认情况下将对其进行过滤。
所以有多种解决方案:
module_hotfixes=true
,这允许DNF更新或安装也作为模块提供的软件包(即使尚未安装)dnf --disablerepo AppStream
,这可能很乏味dnf module disable xxx
问题的模块(在这里我不知道有问题的模块的名称)