• Linux 通过yum 方式离线下载依赖rpm包的操作步骤


    离线下载依赖rpm包的方法


    1.简单获取依赖关系

    yum deplist rpm-build
    
    注意 deplist 为依赖项目 我在arm 上面简单跑一下结果为
    package: rpm-build-4.15.1-12.ky10.aarch64
      dependency: /bin/bash
       provider: bash-5.0-14.se.01.ky10.aarch64
      dependency: /bin/sh
       provider: bash-5.0-14.se.01.ky10.aarch64
       provider: coreutils-8.31-5.p02.ky10.aarch64
      dependency: binutils
       provider: binutils-2.33.1-5.ky10.aarch64
      dependency: bzip2
       provider: bzip2-1.0.8-3.ky10.aarch64
      dependency: cpio
       provider: cpio-2.12-14.ky10.aarch64
      dependency: diffutils
       provider: diffutils-3.7-3.ky10.aarch64
      dependency: elfutils
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: file
       provider: file-5.38-1.ky10.aarch64
      dependency: findutils
       provider: findutils-2:4.7.0-4.ky10.aarch64
      dependency: gawk
       provider: gawk-5.0.1-2.ky10.aarch64
      dependency: grep
       provider: grep-3.4-0.1.ky10.aarch64
      dependency: gzip
       provider: gzip-1.9-18.ky10.aarch64
      dependency: ld-linux-aarch64.so.1()(64bit)
       provider: glibc-2.28-36.1.ky10.aarch64
      dependency: ld-linux-aarch64.so.1(GLIBC_2.17)(64bit)
       provider: glibc-2.28-36.1.ky10.aarch64
      dependency: libacl.so.1()(64bit)
       provider: libacl-2.2.53-7.ky10.aarch64
      dependency: libbz2.so.1()(64bit)
       provider: bzip2-1.0.8-3.ky10.aarch64
      dependency: libc.so.6(GLIBC_2.17)(64bit)
       provider: glibc-2.28-36.1.ky10.aarch64
      dependency: libcap.so.2()(64bit)
       provider: libcap-2.27-1.ky10.aarch64
      dependency: libcrypto.so.1.1()(64bit)
       provider: openssl-libs-1:1.1.1d-9.ky10.aarch64
      dependency: libdb-5.3.so()(64bit)
       provider: libdb-5.3.28-35.ky10.aarch64
      dependency: libdl.so.2()(64bit)
       provider: glibc-2.28-36.1.ky10.aarch64
      dependency: libdw.so.1()(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libdw.so.1(ELFUTILS_0.167)(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libelf.so.1()(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libelf.so.1(ELFUTILS_1.0)(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libelf.so.1(ELFUTILS_1.3)(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libelf.so.1(ELFUTILS_1.6)(64bit)
       provider: elfutils-0.177-3.ky10.aarch64
      dependency: libgomp.so.1()(64bit)
       provider: libgomp-7.3.0-20190804.h30.ky10.aarch64
      dependency: liblua-5.3.so()(64bit)
       provider: lua-5.3.5-4.ky10.aarch64
      dependency: liblzma.so.5()(64bit)
       provider: xz-libs-5.2.4-10.ky10.aarch64
      dependency: libm.so.6()(64bit)
       provider: glibc-2.28-36.1.ky10.aarch64
      dependency: libmagic.so.1()(64bit)
       provider: file-libs-5.38-1.ky10.aarch64
      dependency: libpopt.so.0()(64bit)
       provider: popt-1.16-17.ky10.aarch64
    

    2. 根据结果集组织依赖的包信息

    第一步先下载要安装的rpm包
    mkdir /rpmbuild_aarch64 && cd /rpmbuild_aarch64
    yumdownloader rpm-build
    第二步直接下载 依赖的rpm包
    
    for i in `yum deplist rpm-build |grep provider |cut -d : -f 2  |uniq` ; do yumdownloader $i ; done
    

    3. 下载结果为

    image

  • 相关阅读:
    mongo常用查询
    MongoDB
    python连接mongo
    linux 硬盘
    kali 日志
    linux 命令
    grep
    linux shell
    linux 匹配字符串是否为数字
    linux 第一题 计算题
  • 原文地址:https://www.cnblogs.com/jinanxiaolaohu/p/15475953.html
Copyright © 2020-2023  润新知