yum 安装包时解决依赖关系

示例一:

1.本地需求情况

平台 版本 安装包
centos 7.9  microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm

 

 

 

2.下载包到指定文件夹并查看

# wget https://packages.microsoft.com/yumrepos/edge/microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm
--2022-02-15 11:10:23--  https://packages.microsoft.com/yumrepos/edge/microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm
正在解析主机 packages.microsoft.com (packages.microsoft.com)... 65.52.183.205
正在连接 packages.microsoft.com (packages.microsoft.com)|65.52.183.205|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:123862584 (118M) [application/x-redhat-package-manager]
正在保存至: “microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm”

100%[==============================================================================>] 123,862,584 5.69MB/s 用时 17s

2022-02-15 11:10:41 (6.76 MB/s) - 已保存 “microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm” [123862584/123862584])
# ls
microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm

3.安装时报错

# rpm -ivh microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm
警告:microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID be1229cf: NOKEY
错误:依赖检测失败:
        libatomic.so.1()(64bit) 被 microsoft-edge-stable-98.0.1108.50-1.x86_64 需要
        libatomic.so.1(LIBATOMIC_1.0)(64bit) 被 microsoft-edge-stable-98.0.1108.50-1.x86_64 需要
        liberation-fonts 被 microsoft-edge-stable-98.0.1108.50-1.x86_64 需要
        libvulkan.so.1()(64bit) 被 microsoft-edge-stable-98.0.1108.50-1.x86_64 需要

4.检索所需依赖包

# repoquery --requires --resolve microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm

5.执行安装

# yum -y install microsoft-edge-stable-98.0.1108.50-1.x86_64.rpm

示例二:

1.本地需求情况

平台 版本 安装包
centos 7.9  baidunetdisk-4.3.0.x86_64.rpm

 

 

 

2.下载包到指定文件夹并查看

# wget https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.3.0/baidunetdisk-4.3.0.x86_64.rpm
--2022-02-15 11:16:49--  https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.3.0/baidunetdisk-4.3.0.x86_64.rpm
正在解析主机 issuepcdn.baidupcs.com (issuepcdn.baidupcs.com)... 116.114.96.38, 2408:8719:3100:4::7beb:1e26
正在连接 issuepcdn.baidupcs.com (issuepcdn.baidupcs.com)|116.114.96.38|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:169322486 (161M) [application/octet-stream]
正在保存至: “baidunetdisk-4.3.0.x86_64.rpm”

100%[==============================================================================>] 169,322,486 2.74MB/s 用时 78s

2022-02-15 11:18:07 (2.08 MB/s) - 已保存 “baidunetdisk-4.3.0.x86_64.rpm” [169322486/169322486])
# ls
baidunetdisk-4.3.0.x86_64.rpm

3.安装时报错

# rpm -ivh baidunetdisk-4.3.0.x86_64.rpm
错误:依赖检测失败:
        libXScrnSaver 被 baidunetdisk-4.3.0-1.x86_64 需要

4.检索所需依赖包

# repoquery --requires --resolve baidunetdisk-4.3.0.x86_64.rpm

5.执行安装

# yum install -y baidunetdisk-4.3.0.x86_64.rpm

 

posted @ 2022-02-15 11:25  Tnu  阅读(1348)  评论(0编辑  收藏  举报