【Linux】 command “yum” not found

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版本

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值