• apt安装yum


    配置apt国内镜像源

    /etc/apt/sources.list

    echo "
    deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
    deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
    deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
    deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
    
    deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
    deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
    
    deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
    deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
    
    
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse"
    > /etc/apt/sources.list
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35

    安装yum

      apt update
      apt upgrade
      apt-get install build-essential
      apt-get install yum
    
    • 1
    • 2
    • 3
    • 4

    异常处理

    Q1: NO_PUBKEY
    在这里插入图片描述
    把这些PUBKEY加入到apt-key即可。

    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
    
    • 1

    Q2: 解决依赖问题

    the following package have unmet dependencies:
    python-rpm:Depends:rpm-common(=4.14.2.1+dfsg1-1) but 4.16.1.2+dfsg1-3 is to be installed
    E: Unable to correct problems, you have held broken packages.
    
    • 1
    • 2
    • 3
    apt install aptitude -y
    aptitude install yum  # aptitude会自动给出依赖问题的解决方案,自己选择一下就ok了
    
    • 1
    • 2

    只要推荐方案中有 11) yum [Not Installed],就选no;否则选yes
    Accept this solution? [Y/n/q/?] n
    The following actions will resolve these dependencies:

      Keep the following packages at their current version:
    
    • 1
    1.  libpython2-stdlib [Not Installed]
      
      • 1
    2.  python [Not Installed]
      
      • 1
    3.  python-libxml2 [Not Installed]
      
      • 1
    4.  python-minimal [Not Installed]
      
      • 1
    5.  python-pycurl [Not Installed]
      
      • 1
    6.  python-rpm [Not Installed]
      
      • 1
    7.  python-sqlite [Not Installed]
      
      • 1
    8.  python-sqlitecachec [Not Installed]
      
      • 1
    9.  python-urlgrabber [Not Installed]
      
      • 1
    10. python2 [Not Installed]
      
      • 1
    11. yum [Not Installed]   
      
      • 1

    在这里插入图片描述
    在这里插入图片描述

  • 相关阅读:
    第五章 数组和广义表
    03_Flutter自定义下拉菜单
    数据结构(二)
    图片OCR转表格:终极攻略,优缺点全解析
    new、express new、operator new、placement new 之间的千丝万缕
    Linux xargs命令
    exness:流动性系列-流动性清洗和反转、决策区间
    AopContext对象原理
    SQL 经典50题(题目+解答)(1)
    遍历二叉树 先序+后序+中序递归 用递归序来了解递归基本样子
  • 原文地址:https://blog.csdn.net/qq_29012499/article/details/132789078