1、执行命令 sudo apt install yum
弹出unable to locate package yum
2、执行
# 修改 apt-get 源的配置文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
sudo vim /etc/apt/sources.list #修改
sudo apt-get update #更新列表
弹出vim: command not found
3、解决vim: command not found,执行:
sudo rm /var/lib/dpkg/lock*
sudo apt-get update && sudo apt-get install vim
4、解决
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
那就执行sudo su进入管理员界面,再执行那条命令
5、解决弹出unable to locate package yum,其中镜像源注意空号的位置
https://blog.csdn.net/SH_ke/article/details/118496704
6、后来发现确实安装不了yum,直接用apt-get来代替Yum吧,yum是在centos里的。
注:本人用的ubuntu22版本