YUM 和依赖项,它们如何工作

YUM 和依赖项,它们如何工作

我想安装海湾合作委员会在 RHEL 7.4 服务器上,我没有互联网连接。为此,我安装了 RHEL 7.4 iso 并配置了一个名为 LocalRepo 的 yum 存储库文件以从 cdrom 安装。当我尝试安装时海湾合作委员会我发现以下错误:

# yum --disablerepo=\* --enablerepo=LocalRepo install gcc
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Repository rhel-7-server-rpms is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-16.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-16.el7 for package: gcc-4.8.5-16.el7.x86_64
--> Processing Dependency: libgomp = 4.8.5-16.el7 for package: gcc-4.8.5-16.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-16.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-16.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-16.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-16.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-196.el7 will be installed
--> Processing Dependency: glibc = 2.17-196.el7 for package: glibc-devel-2.17-196.el7.x86_64
--> Processing Dependency: glibc-headers = 2.17-196.el7 for package: glibc-devel-2.17-196.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-196.el7.x86_64
---> Package libgomp.i686 0:4.8.5-16.el7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.17-196.el7 will be installed
--> Processing Dependency: glibc-common = 2.17-196.el7 for package: glibc-2.17-196.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-196.el7.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-196.el7.i686
---> Package glibc-headers.x86_64 0:2.17-196.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-196.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-196.el7.x86_64
--> Running transaction check
---> Package glibc.i686 0:2.17-196.el7 will be installed
--> Processing Dependency: glibc-common = 2.17-196.el7 for package: glibc-2.17-196.el7.i686
---> Package kernel-headers.x86_64 0:3.10.0-693.el7 will be installed
---> Package nss-softokn-freebl.i686 0:3.28.3-6.el7 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-196.el7.i686 (LocalRepo)
           Requires: glibc-common = 2.17-196.el7
           Installed: glibc-common-2.17-196.el7_4.2.x86_64 (@rhel-7-server-rpms)
               glibc-common = 2.17-196.el7_4.2
           Available: glibc-common-2.17-196.el7.x86_64 (LocalRepo)
               glibc-common = 2.17-196.el7
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: glibc-2.17-196.el7.i686 (LocalRepo)
           Requires: glibc-common = 2.17-196.el7
           Installed: glibc-common-2.17-196.el7_4.2.x86_64 (@rhel-7-server-rpms)
               glibc-common = 2.17-196.el7_4.2
           Available: glibc-common-2.17-196.el7.x86_64 (LocalRepo)
               glibc-common = 2.17-196.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

看来服务器已经更新了通用的glib安装了库,所以我有三个问题:
1. 有一种方法可以告诉 yum 使用已安装的内容,知道我正在安装的内容现在可能可以工作吗?
2. 有一种方法可以告诉 yum 安装所需的通用的glib其他地方的库,允许安装海湾合作委员会
3. 在我目前的情况下,你知道有什么解决办法吗? (没有互联网连接)

提前感谢大家!

答案1

如果您有另一台可以访问互联网的服务器,则可能更容易执行 yum install(或者可能需要重新安装) --downloadonly gcc 检查 glib-common 的级别 - 需要大于或等于您的其他服务器。这将创建一个包含 gcc 和依赖项的文件。将该文件移动到没有互联网访问的服务器并进行 yum 安装

相关内容