perf 安装 opencv 时依赖关系损坏

perf 安装 opencv 时依赖关系损坏

我一次又一次收到此错误。最后,它已经安装好了。请建议我如何修复此问题。我尝试了上面提到的所有解决方案这个问题但没有得到解决方案。

vinayak@vinayak-PC:~$ sudo apt-get install libopencv-highgui-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:
 libopencv-highgui-dev : Depends: libgtk2.0-dev but it is not going to be installed
                         Depends: libraw1394-dev but it is not going to be installed
                         Depends: libdc1394-22-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
vinayak@vinayak-PC:~$ 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
                 Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not going to be installed
                 Depends: libxi-dev (>= 1:1.0.1-4) but it is not going to be installed
                 Depends: libxrandr-dev (>= 2:1.2.99) but it is not going to be installed
                 Depends: libxcursor-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
vinayak@vinayak-PC:~$ sudo apt-get install libpango1.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:
 libpango1.0-dev : Depends: libpango-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is to be installed
                   Depends: libpangocairo-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is to be installed
                   Depends: libpangoft2-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is to be installed
                   Depends: libpangoxft-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is to be installed
                   Depends: libfreetype6-dev but it is not going to be installed
                   Depends: libxrender-dev but it is not going to be installed
                   Depends: libxft-dev but it is not going to be installed
                   Depends: libfontconfig1-dev (>= 2.10.91) but it is not going to be installed
                   Depends: libharfbuzz-dev (>= 0.9.9) but it is not going to be installed
                   Depends: libcairo2-dev (>= 1.12.10) but it is not going to be installed
                   Recommends: debhelper but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
vinayak@vinayak-PC:~$ sudo apt-get install libpango-1.0-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpango-1.0-0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
vinayak@vinayak-PC:~$

在执行 aptitude install 时,我收到了此信息

vinayak@vinayak-PC:~$ sudo aptitude install libopencv-dev
The following NEW packages will be installed:
  gir1.2-gtk-2.0{a} libatk1.0-dev{a} libavcodec-dev{a} libavformat-dev{a} 
  libavutil-dev{a} libcairo-script-interpreter2{a} libcairo2-dev{ab} 
  libcv-dev{a} libcvaux-dev{a} libdc1394-22-dev{a} libfontconfig1-dev{ab} 
  libfreetype6-dev{ab} libgdk-pixbuf2.0-dev{a} libgtk2.0-dev{a} 
  libharfbuzz-dev{ab} libharfbuzz-gobject0{a} libhighgui-dev{a} 
  libilmbase-dev{a} libjasper-dev{a} libopencv-calib3d-dev{a} 
  libopencv-contrib-dev{a} libopencv-core-dev{a} libopencv-dev 
  libopencv-features2d-dev{a} libopencv-flann-dev{a} libopencv-gpu-dev{a} 
  libopencv-gpu2.4{a} libopencv-highgui-dev{a} libopencv-imgproc-dev{a} 
  libopencv-legacy-dev{a} libopencv-ml-dev{a} libopencv-objdetect-dev{a} 
  libopencv-ocl-dev{a} libopencv-ocl2.4{a} libopencv-photo-dev{a} 
  libopencv-stitching-dev{a} libopencv-stitching2.4{a} 
  libopencv-superres-dev{a} libopencv-superres2.4{a} libopencv-ts-dev{a} 
  libopencv-ts2.4{a} libopencv-video-dev{a} libopencv-videostab-dev{a} 
  libopencv-videostab2.4{a} libopencv2.4-java{a} libopencv2.4-jni{a} 
  libopenexr-dev{a} libpango1.0-dev{ab} libpixman-1-dev{ab} 
  libraw1394-dev{ab} libraw1394-tools{ab} libswscale-dev{a} 
  libxcb-shm0-dev{ab} libxcomposite-dev{a} libxcursor-dev{ab} 
  libxft-dev{ab} libxi-dev{ab} libxinerama-dev{ab} libxrandr-dev{a} 
  libxrender-dev{ab} opencv-data{a} x11proto-composite-dev{a} 
  x11proto-randr-dev{a} x11proto-render-dev{a} x11proto-xinerama-dev{a} 
0 packages upgraded, 65 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.5 MB of archives. After unpacking 112 MB will be used.
The following packages have unmet dependencies:
 libpixman-1-dev : Depends: libpixman-1-0 (= 0.30.2-2ubuntu1.1) but 0.33.6-1 is installed.
 libfreetype6-dev : Depends: libfreetype6 (= 2.5.2-1ubuntu2.5) but 2.6.3-3 is installed.
 libpango1.0-dev : Depends: libpango-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is installed.
                   Depends: libpangocairo-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is installed.
                   Depends: libpangoft2-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is installed.
                   Depends: libpangoxft-1.0-0 (= 1.36.3-1ubuntu1.1) but 1.38.1-1 is installed.
 libraw1394-dev : Depends: libraw1394-11 (= 2.1.0-1ubuntu1) but 2.1.1-2 is installed.
 libxcb-shm0-dev : Depends: libxcb-shm0 (= 1.10-2ubuntu1) but 1.11.1-1 is installed.
 libxi-dev : Depends: libxi6 (= 2:1.7.1.901-1ubuntu1.1) but 2:1.7.6-1 is installed.
 libraw1394-tools : Depends: libraw1394-11 (= 2.1.0-1ubuntu1) but 2.1.1-2 is installed.
 libcairo2-dev : Depends: libcairo2 (= 1.13.0~20140204-0ubuntu1.1) but 1.14.6-1 is installed.
                 Depends: libcairo-gobject2 (= 1.13.0~20140204-0ubuntu1.1) but 1.14.6-1 is installed.
 libxft-dev : Depends: libxft2 (= 2.3.1-2) but 2.3.2-1 is installed.
 libxrender-dev : Depends: libxrender1 (= 1:0.9.8-1build0.14.04.1) but 1:0.9.9-2 is installed.
 libxinerama-dev : Depends: libxinerama1 (= 2:1.1.3-1) but 2:1.1.3-1+b1 is installed.
 libharfbuzz-dev : Depends: libharfbuzz0b (= 0.9.27-1ubuntu1) but 1.0.1-1+b1 is installed.
 libfontconfig1-dev : Depends: libfontconfig1 (= 2.11.0-0ubuntu4.1) but 2.11.0-6.3 is installed.
 libxcursor-dev : Depends: libxcursor1 (= 1:1.1.14-1) but 1:1.1.14-1+b1 is installed.
The following actions will resolve these dependencies:

      Keep the following packages at their current version:
1)      libcairo2-dev [Not Installed]                      
2)      libcv-dev [Not Installed]                          
3)      libcvaux-dev [Not Installed]                       
4)      libdc1394-22-dev [Not Installed]                   
5)      libfontconfig1-dev [Not Installed]                 
6)      libfreetype6-dev [Not Installed]                   
7)      libgtk2.0-dev [Not Installed]                      
8)      libharfbuzz-dev [Not Installed]                    
9)      libhighgui-dev [Not Installed]                     
10)     libopencv-contrib-dev [Not Installed]              
11)     libopencv-dev [Not Installed]                      
12)     libopencv-highgui-dev [Not Installed]              
13)     libopencv-legacy-dev [Not Installed]               
14)     libopencv-objdetect-dev [Not Installed]            
15)     libopencv-ocl-dev [Not Installed]                  
16)     libopencv-superres-dev [Not Installed]             
17)     libopencv-videostab-dev [Not Installed]            
18)     libpango1.0-dev [Not Installed]                    
19)     libpixman-1-dev [Not Installed]                    
20)     libraw1394-dev [Not Installed]                     
21)     libraw1394-tools [Not Installed]                   
22)     libxcb-shm0-dev [Not Installed]                    
23)     libxcursor-dev [Not Installed]                     
24)     libxft-dev [Not Installed]                         
25)     libxi-dev [Not Installed]                          
26)     libxinerama-dev [Not Installed]                    
27)     libxrandr-dev [Not Installed]                      
28)     libxrender-dev [Not Installed]                     



Accept this solution? [Y/n/q/?]

编辑:

我努力了apt-get -f 安装。它也不能正常工作。

在 lsb_release -a 上,它给出

➜  ~ git:(master) ✗ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty

答案1

按照朋友的建议,我能够从源代码安装,没有任何冲突。感谢大家花时间帮助我

相关内容