首页 > 编程知识 正文

ubuntu安装报错怎么办,ubuntu安装软件报错13

时间:2023-05-04 04:29:31 阅读:268293 作者:363

Ubuntu20.04更换阿里云源后安装软件都会报错:The following packages have unmet dependencies

查看资料,大概是ubuntu本身的源比较版本较老,而阿里云的源比较新,因此版本不匹配造成依赖的库不匹配,所以只要将阿里云的源换回Ubuntu官方源

 

替换源

Ubuntu20.04LTS的清华大学源如下:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse# 预发布软件源,不建议启用# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

Ubuntu 的软件源配置文件是 /etc/apt/sources.list,在配置之前最好做个备份,然后将以上内容复制到该文件进行替换。

 

更新源

更新本地软件源列表:sudo apt-get update

 

根据刚才更新的软件源更新本地软件库:sudo apt-get upgrade

然后可以正常安装了。

 

其它

如果以上执行完还是不行,可以参考此链接里面回答的几种方法:What is the step-by-step procedure to fix the “The following packages have unmet dependencies”?

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。