Não é possível localizar o pacote libpango1-dev

1

Estou usando o Ubuntu 14.04, OpenCV 3.0.0, esta é a lista de comandos e erros para tentar minha biblioteca opencv depois de ser instalada

    linaro@linaro-nano:~/opencv/samples/cpp$ ./cpp-example-facedetect lena.jpg

    This program demonstrates the cascade recognizer. Now you can use Haar or LBP features.
    This classifier can recognize many kinds of rigid objects, once the appropriate classifier is trained.
    It's most known use is for faces.
    Usage:
    ./facedetect [--cascade=<cascade_path> this is the primary trained classifier such as frontal face]
       [--nested-cascade[=nested_cascade_path this an optional secondary classifier such as eyes]]
       [--scale=<image scale greater or equal to 1, try 1.3 for example>]
       [--try-flip]
       [filename|camera_index]

    see facedetect.cmd for one call:
    ./facedetect --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3

    During execution:
        Hit any key to quit.
        Using OpenCV version 3.0.0-dev

    Processing 1 lena.jpg
    Capture from AVI didn't work
    OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/linaro/nourelhak/opencv/modules/highgui/src/window.cpp, line 522
    terminate called after throwing an instance of 'cv::Exception'
      what():  /home/linaro/opencv/modules/highgui/src/window.cpp:522: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

    Aborted


    linaro@linaro-nano:~opencv/samples/cpp$ sudo apt-get install cmake git libgtk2.0-dev pkg-config 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    cmake is already the newest version.
    git is already the newest version.
    pkg-config is already the newest version.
    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.
    linaro@linaro-nano:~/opencv/samples/cpp$ sudo apt-get install libgtk2.0-dev libpango1-dev libcairo2-dev libfontconfig1-dev
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package libpango1-dev

        linaro@linaro-nano:~/opencv/samples/cpp$ apt-cache policy libfontconfig1
        libfontconfig1:
          Installed: 2.11.0-0ubuntu4
          Candidate: 2.11.0-0ubuntu4
          Version table:
         *** 2.11.0-0ubuntu4 0
                500 http://ports.ubuntu.com/ubuntu-ports/ trusty/main armhf Packages
                100 /var/lib/dpkg/status
        linaro@linaro-nano:~/opencv/samples/cpp$ apt-cache madison libfontconfig1
        libfontconfig1 | 2.11.0-0ubuntu4 | http://ports.ubuntu.com/ubuntu-ports/ trusty/main armhf Packages
        fontconfig | 2.11.0-0ubuntu4 | http://ports.ubuntu.com/ubuntu-ports/ trusty/main Sources

  linaro@linaro-nano:~/nourelhak/opencv/samples/cpp$ 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: libfreetype6-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: libcairo2-dev (>= 1.12.10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
linaro@linaro-nano:~/nourelhak/opencv/samples/cpp$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
linaro@linaro-nano:~/nourelhak/opencv/samples/cpp$ sudo apt-get install libgtk2.0-dev libpango1-dev libcairo2-dev libfontconfig1-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libpango1-dev
linaro@linaro-nano:~/nourelhak/opencv/samples/cpp$ sudo apt-get install libgtk2.0-dev libpango1.0-dev libcairo2-dev libfontconfig1-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:
 libcairo2-dev : Depends: libfreetype6-dev (>= 2.1.10) but it is not going to be installed
 libfontconfig1-dev : Depends: libfreetype6-dev (>= 2.1.7) but it is not going to be installed
 libpango1.0-dev : Depends: libfreetype6-dev but it is not going to be installed
                   Depends: libxft-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
linaro@linaro-nano:~/nourelhak/opencv/samples/cpp$

Eu tive libgtk2.0-dev não conseguiu ser instalado desde o início, mas eu pensei que forçá-lo com o aptitude em vez de apt-get

    
por Riwa Ml 17.08.2015 / 16:44

2 respostas

1

Como vejo na sua saída, o erro é:

  

E: Não é possível localizar o pacote libpango1-dev

Não existe um pacote chamado libpango1-dev , em vez disso, é libpango1.0-dev

Para instalar o libpango1.0-dev , use:

sudo apt-get install libpango1.0-dev'
    
por Ron 17.08.2015 / 16:52
0

comando de execução

sudo apt-get -f install
sudo apt-get install libgtk2.0-dev libpango1.0-dev libcairo2-dev libfontconfig1-dev

ele instalará a dependência quebrada e também tentará isso link

EDIT: tente este comando

sudo aptitude install libpango1.0-0=1.29.3+git20110916-0ubuntu1 plymouth-x11=0.8.2-2ubuntu28 libpango1.0-dev=1.29.3+git20110916-0ubuntu1 gir1.2-pango-1.0=1.29.3+git20110916-0ubuntu1

espero que funcione

    
por pl_rock 17.08.2015 / 17:03