Estou tentando instalar o OpenCV seguindo as instruções em: https://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html
Quando eu corro:sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
Eu recebo este erro:
The following packages have unmet dependencies:
libavcodec-dev : Depends: libavutil-dev (= 7:2.8.6-1ubuntu2) but it is not going to be installed
Depends: libswresample-dev (= 7:2.8.6-1ubuntu2) but it is not going to be installed
libavformat-dev : Depends: libavformat-ffmpeg56 (= 7:2.8.6-1ubuntu2) but 7:2.8.11-0ubuntu0.16.04.1 is to be installed
Depends: libavutil-dev (= 7:2.8.6-1ubuntu2) but it is not going to be installed
Depends: libswresample-dev (= 7:2.8.6-1ubuntu2) but it is not going to be installed
libgtk2.0-dev : Depends: libgtk2.0-0 (= 2.24.30-1ubuntu1) but 2.24.30-1ubuntu1.16.04.2 is to be installed
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
Depends: libxcursor-dev but it is not going to be installed
Recommends: debhelper but it is not going to be installed
libswscale-dev : Depends: libavutil-dev (= 7:2.8.6-1ubuntu2) but it is not going to be installed
Depends: libswscale-ffmpeg3 (= 7:2.8.6-1ubuntu2) but 7:2.8.11-0ubuntu0.16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Pesquisei no Google cada dependência individualmente, mas não consegui encontrar nada que funcionasse.
Estou usando o Ubuntu 16.04.3 LTS
Eu simplesmente não consegui resolver esse problema, então instalei o Ubuntu 16.04 ( http://old-releases.ubuntu.com/releases/16.04.0/ubuntu-16.04-desktop-amd64.iso ) e consegui executar
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sem erros.