原本打算安装 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 的标准官方源,一旦出现问题,可以用这个来恢复:
deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse ##测试版源 deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse # 源码 deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse ##测试版源 deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse # Canonical 合作伙伴和附加 #deb http://archive.canonical.com/ubuntu/ trusty partner #deb http://extras.ubuntu.com/ubuntu/ trusty main