linux - 无法在 Raspberry Pi 2 上安装 libgtk2.0-dev

标签 linux raspbian raspberry-pi2

我正在尝试在运行最新 raspbian 的 Raspberry Pi 2 上安装 libgtk2.0-dev。当我使用命令 sudo apt-get install libgtk2.0-dev 时,出现以下依赖性错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgtk2.0-dev : Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
                 Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试使用 sudo apt-get install -fsudo apt-get updatesudo apt-get upgrade 修复损坏的包然后 sudo apt-get install libgtk2.0-dev。它仍然没有用。我在依赖项及其依赖项上尝试了 apt-get install,但结果是一样的。 link1中的解决方案和 link2也没有帮助。

我的 source.list 包含:

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

我的 source.list 中是否遗漏了什么?我该如何解决这个问题?

最佳答案

apt-cache policy libgtk2.0-dev libpango1.0-dev libcairo2-dev 显示问题出在/etc/apt/sources.list.d/raspi.list。

raspi.list 包含 deb http://archive.raspberrypi.org/debian/wheezy main。将 wheezy 更改为 jessie,运行 apt-get update 然后运行 ​​apt-get install libgtk2.0-dev 成功了。

关于linux - 无法在 Raspberry Pi 2 上安装 libgtk2.0-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33280656/

相关文章:

python - 打字机效果 Pygame

powershell - 如何使用Raspberry Pi上运行的Windows 10 IoT核心版进行交互式登录?

linux - 将日志文件解析为多个唯一的日志文件

linux - rpmbuild 已安装(但未打包)的文件源

python - 在树莓派上使用 python 库 brother_ql 进行打印

environment-variables - 树莓派 Qt5 设置物理屏幕尺寸

redis - 在 Pi 上安装 Redis 时出现问题

audio - 由qtwenengine simplebrowser播放的html5视频在树莓派2上没有声音且不流畅

android - Linux:keytool 显示 "Unrecognized command: -exportcert"

linux - 我必须只获取文本文件中包含另一个目录中文件的文件名的那些行