安装应用程序时出错

安装应用程序时出错

所以我安装了 synaptic 包管理器..通过它,我检查了一次 libopencv-highgui-dev 并应用了完全删除..之后我安装了它...现在每次我尝试安装一个应用程序例如 Format Junkie

sudo add-apt-repository ppa:format-junkie-team/release && sudo apt-get update && sudo apt-get install formatjunkie

在命令安装格式 junkie 中每次都会出现该错误:

     sudo apt-get install formatjunkie
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:
 libopencv-features2d-dev : Depends: libopencv-highgui-dev (= 2.3.1-11ubuntu2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我该怎么办?第二,我做错了什么,这样就不会再发生这种事了?

输出lsb_release -a

No LSB modules are available.  
Distributor ID: Ubuntu   
Description:    Ubuntu 12.10  
Release:    12.10  
Codename:   quantal

答案1

打开 /var/log/dist-upgrade/apt.log

识别损坏的包,打开终端并执行以下命令。

首先彻底移除破损的包装(如果还有剩余则移除)

sudo apt-get remove --purge libopencv-highgui-dev

系统更新及升级包

sudo apt-get update && sudo apt-get upgrade

使用此命令修复依赖关系

sudo apt-get install -f 

删除不必要的包

sudo apt-get autoremove

答案2

尝试这样做:apt-get install formatjunkie libopencv-highgui-dev=2.3.1-11ubuntu2 libopencv-features2d-dev

这应该强制它(不要忘记 sudo!)尝试获取它所需的版本。

如果没有,我会看看那个包,它可能只是在 PPA 中损坏了(我是该 PPA 的上传者之一,如果你读过上传者条目的话:P)

相关内容