赞
踩
安装yum的命令:
sudo apt install yum
若出现报错:
sudo: yum:找不到命令
sudo -s
或:
su:
sudo apt-get install build-essential
sudo apt-get install yum
若出现以下报错:
则:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo gedit /etc/apt/sources.list
或者:
sudo vim /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
在此行后,将前面找到的清华镜像的内容复制在list文件中(此处为20.04版本):
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
得到list文件如下:
sudo apt update
sudo apt-get install yum
sudo apt install python-urlgrabber
sudo apt install python-sqlitecachec
然后再次尝试下载yum
sudo yum version
参考文献:
【1】Ubuntu:yum命令找不到(包含报错解决方案)
【2】Ubuntu无法定位软件包yum(添加镜像后还出现)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。