ubuntu 出现“E: 无法定位软件包问题”解决方法
时间:2024-04-02 12:55:48 来源:网络cs 作者:言安琪 栏目:跨境风云 阅读:
后续补充: 一定要注意镜像源版本的问题!
有的文章提供的镜像源的版本是focal,你的系统版本可能不一样,是jammy, 直接复制别人的镜像源,版本对不上就会一直报错。
可通过 lsb_release -a 查看版本,看codename就可以知道自己的镜像源版本。
首先确保网络连接了,之后参考了这篇博客,就解决了
解决 Ubuntu E:无法定位软件包问题-CSDN博客https://blog.csdn.net/qq_41428418/article/details/125265190?ops_request_misc=&request_id=&biz_id=102&utm_term=ubuntu%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%97%A0%E6%B3%95%E5%AE%9A%E4%BD%8D&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-125265190.142%5Ev96%5Epc_search_result_base9&spm=1018.2226.3001.4187还没有安装vim,使用gedit。
保存后退出即可!
后续又报错了,软件包有未满足的依赖关系,查资料发现还是这个文件的问题
在终端输入
lsb_release -a
查询得知自己的codename为jammy,需要添加jammy的下载源
打开文件
sudo gedit /etc/apt/sources.list
根据自己的系统配置对应的镜像源文件,将文件修改为下列内容
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
重新输入
sudo apt-get update
sudo apt-get upgrade
本文链接:https://www.kjpai.cn/fengyun/2024-04-02/152622.html,文章来源:网络cs,作者:言安琪,版权归作者所有,如需转载请注明来源和作者,否则将追究法律责任!
下一篇:返回列表