Ubuntu LTS 20.04 安装 yum教程解决方案,apt install 报 unable located in 错误

Ubuntu 安装 yum

清华镜像源 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

关于Ubuntu 安装 yum 失败 ,如何在Ubuntu安装yum的问题 先进行换源,进入 /etc/apt/ 目录下,备份
sources.list,打开sources.list编辑

cd /etc/apt
cp sources.list source.list.backup
vim sources.list

打开清华镜像源网站,复制上面的内容,替换sources.list

# 默认注释了源码镜像以提高 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 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/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

或者使用命令替换

命令替换
执行如下命令自动替换
sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list

替换后在首行添加下面这一句

deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse

保存退出,更新镜像源,下载yum

sudo apt update
sudo apt install yum

你可能感兴趣的:(Ubuntu,ubuntu,linux,服务器)