栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

linux ubuntu安装yum

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

linux ubuntu安装yum

1、安装前首先要配置【正确】镜像源

打开终端执行命令:

备份镜像源文件:sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

编辑镜像源文件:sudo vim /etc/apt/sources.list

里面内容全部删除。

打开清华源选择正确的linux系统和版本:

注意:不要用其他的镜像源,否则你得到的永远是【E: 无法定位软件包 yum】错误。

ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirrorubuntu 使用帮助 | 镜像站使用帮助 | 清华大学开源软件镜像站,致力于为国内和校内用户提供高质量的开源软件镜像、Linux 镜像源服务,帮助用户更方便地获取开源软件。本镜像站由清华大学 TUNA 协会负责运行维护。https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

把清华源里面的内容全部复制到 sources.list,额外在头部添加一行:

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

如Ubuntu:

#另外添加的一行
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse

# 默认注释了源码镜像以提高 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

保存退出

2、更新软件源

执行终端命令:sudo apt-get update

3、安装yum

命令:sudo apt-get install yum

4、检测版本

命令:yum --version

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/894441.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号