Ubuntu 关于包依赖关系的学习总结

前端之家收集整理的这篇文章主要介绍了Ubuntu 关于包依赖关系的学习总结前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

原本打算安装 libgtk2.0-dev 包,报错:


直觉告诉我们,需要对这些依赖包一个一个解决,一旦全部装上之后,就可以装 libgtk2.0-dev 包了,然而,现实却是,libglib2.0-dev也不能安装,产生了类似上图的错误信息(没有对应的截图)。StackOverflow上给出的解决方案是,编辑 /etc/apt/sources.list,注释掉所有的非官方源,只保留官方源,重新:

sudo apt-get update

sudo apt-get install libgtk2.0-dev

成功安装 !


附上 Ubuntu 14.04 的标准官方源,一旦出现问题,可以用这个来恢复:

  1. deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
  2. deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
  3. deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
  4. deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
  5. ##测试版源
  6. deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
  7. # 源码
  8. deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
  9. deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
  10. deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
  11. deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
  12. ##测试版源
  13. deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
  14. # Canonical 合作伙伴和附加
  15. #deb http://archive.canonical.com/ubuntu/ trusty partner
  16. #deb http://extras.ubuntu.com/ubuntu/ trusty main

猜你在找的Ubuntu相关文章