在 ubuntu 14.10 中安装 smatch 时出错

在 ubuntu 14.10 中安装 smatch 时出错

我尝试安装 smatch 但出现一些错误:

我做到了:

$ git clone git://repo.or.cz/smatch.git
$ cd smatch
$ make
Makefile:107: Your system does not have libgtk2, disabling test-inspect
     LINK     sparse-llvm
/usr/bin/ld: cannot find -ledit
collect2: error: ld returned 1 exit status
Makefile:211: recipe for target 'sparse-llvm' failed
make: *** [sparse-llvm] Error 1

因此我尝试安装:

$ sudo apt-get install libgtk2.0-dev
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: libglib2.0-dev (>= 2.27.3) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not going to be installed
                 Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
                 Depends: libatk1.0-dev (>= 1.29.2) 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.

有什么帮助吗?

答案1

输入这两个命令:

sudo apt-get clean
sudo apt-get 自动清理

尝试修复损坏的依赖关系:

sudo apt-get -f 安装
sudo dpkg--configure-a

然后再次输入sudo apt-get -f install

这应该可以解决您的依赖问题,现在您可以libgtk2再次安装。

相关内容