首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在脱机Centos服务器中安装停靠程序

在脱机Centos服务器中安装停靠程序
EN

Server Fault用户
提问于 2021-03-08 21:41:49
回答 1查看 578关注 0票数 0

我想在离线Centos 7服务器上安装对接器,但缺少依赖项。

我已经在本地虚拟机( Centos 7和内核3.10)中执行了以下指令来打包停靠程序安装依赖关系:

代码语言:javascript
复制
 yumdownloader --resolve docker 
 tar cvzf ~/docker.tar.gz *

然后,我运行下一个命令来将docker安装到我的目标服务器,即centos 7内核3.10:

代码语言:javascript
复制
tar xvf docker.tar.gz -C ~/docker
rpm -ivh --replacefiles --replacepkgs *.rpm

但是,我很困惑如何解决下一个版本控制问题:

代码语言:javascript
复制
error: Failed dependencies:
        audit-libs(x86-64) = 2.8.5-4.el7 is needed by audit-libs-python-2.8.5-4.el7.x86_64
        policycoreutils >= 2.5-11 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy-base >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy-targeted >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        libdevmapper.so.1.02(DM_1_02_97)(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsystemd.so.0()(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsystemd.so.0(LIBSYSTEMD_209)(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        device-mapper-libs >= 7:1.02.97 is needed by docker-common-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsemanage = 2.5-14.el7 is needed by libsemanage-python-2.5-14.el7.x86_64
        libsemanage.so.1(LIBSEMANAGE_1.1)(64bit) is needed by libsemanage-python-2.5-14.el7.x86_64
        libsepol.so.1(LIBSEPOL_1.0)(64bit) is needed by policycoreutils-python-2.5-34.el7.x86_64
        policycoreutils = 2.5-34.el7 is needed by policycoreutils-python-2.5-34.el7.x86_64
        libselinux >= 2.5-14.1 is needed by setools-libs-3.3.8-4.el7.x86_64
        libsepol >= 2.5-10 is needed by setools-libs-3.3.8-4.el7.x86_64
EN

回答 1

Server Fault用户

发布于 2021-03-09 09:34:12

这是一个复杂的问题。脱机安装依赖关系很复杂:在线服务器和脱机服务器上安装的包不相同,因此依赖项不匹配。

我已经记录了这里这个过程,它允许您下载脱机服务器所需的依赖项,但这是相当棘手的。它被记录为zypper,但您可以将其转到yum/dnf。唯一的问题是,对于dnf,它只作为根用户工作(上次我测试):sudo dnf install --downloadonly -c <dnf.conf> --downloaddir=<output_dir> --setopt=reposdir=<repos_dir> --installroot=<tmp_dir>

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1056362

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档