当前位置:   article > 正文

ubuntu 出现“E: 无法定位软件包问题”解决方法_e: 无法定位软件包 x11proto-print-dev

e: 无法定位软件包 x11proto-print-dev

后续补充: 一定要注意镜像源版本的问题!

有的文章提供的镜像源的版本是focal,你的系统版本可能不一样,是jammy, 直接复制别人的镜像源,版本对不上就会一直报错。

可通过 lsb_release -a 查看版本,看codename就可以知道自己的镜像源版本。

 首先确保网络连接了,之后参考了这篇博客,就解决了

解决 Ubuntu E:无法定位软件包问题-CSDN博客icon-default.png?t=N7T8https://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

 根据自己的系统配置对应的镜像源文件,将文件修改为下列内容

  1. deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
  7. deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
  8. deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
  11. deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
  12. deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
  13. deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
  14. deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
  15. deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
  16. deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
  17. deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
  18. deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
  19. deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
  20. deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
  21. deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
  22. deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
  23. deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
  24. deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
  25. deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
  26. deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
  27. deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
  28. deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
  29. deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
  30. deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

重新输入

sudo apt-get update
sudo apt-get upgrade

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/459368
推荐阅读
相关标签
  

闽ICP备14008679号