• 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

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

  • 相关阅读:
    让你的聊天气泡丰富多彩
    VMware Explore 大会发布重磅云上技术之外,VMware 有哪些前沿探索?
    十、pygame小游戏开发
    【学习笔记】设计算法(Design Algorithm)
    JavaScript 的 switch 有四样写法,你知道么?
    vscode px转换rem插件 px to rem & rpx & vw (cssrem)
    悬浮窗开发设计实践
    Controller层代码优化
    _gdb和进程概念
    php output_buffering 缓存使用
  • 原文地址:https://blog.csdn.net/qq_29012499/article/details/132789078