Faced similar issue: Resolved after downgrading dependent packages.
Error:
The following packages have unmet dependencies:
octave : Depends: libarpack2 (>= 2.1) but it is not going to be installed
Depends: libcholmod3.0.6 but it is not going to be installed
Depends: liboctave3 (= 4.0.0-3ubuntu9) but it is not going to be installed
Depends: libosmesa6 (>= 10.2~) but it is not going to be installed
Recommends: libopenblas-base but it is not going to be installed or
libatlas3-base but it is not going to be installed.
Just run: sudo aptitude install octave
(Accept downgrading of libraries,faced no issues after that)
user@user:~/home$ sudo aptitude install octave
The following NEW packages will be installed:
aglfn{a} epstool{a} gnuplot-data{a} gnuplot-qt{a} gnuplot-tex{a} libaec0{a} libamd2.4.1{a} libarpack2{a} libblas-common{a} libblas3{a}
libcamd2.4.1{a} libccolamd2.9.1{a} libcholmod3.0.6{a} libcxsparse3.1.4{a} libfltk-gl1.3{a} libfltk1.3{a} libgfortran3{a} libgl2ps0{a}
libglpk36{a} libgraphicsmagick++-q16-12{a} libgraphicsmagick-q16-3{a} libhdf5-10{a} liblapack3{a} libmagick++-6.q16-5v5{a} liboctave4{a}
libopenblas-base{a} libosmesa6{ab} libplot2c2{a} libpstoedit0c2a{a} libqhull7{a} libqrupdate1{a} libqt4-svg{a} libqt5scintilla2-12v5{a}
libqt5scintilla2-l10n{a} libsz2{a} libtext-unidecode-perl{a} libumfpack5.7.1{a} octave octave-common{a} octave-doc{a} pstoedit{a}
tex-common{a} texinfo{a}
0 packages upgraded, 43 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.5 MB of archives. After unpacking 154 MB will be used.
The following packages have unmet dependencies:
libosmesa6 : Depends: libglapi-mesa (= 11.2.0-1ubuntu2) but 17.0.7-0ubuntu0.16.04.1 is installed.
Internal error: found 2 (choice -> promotion) mappings for a single choice.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libosmesa6 [Not Installed]
2) octave [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libgl1-mesa-glx [17.0.7-0ubuntu0.16.04.1 (now) -> 11.2.0-1ubuntu2 (xenial)]
2) libglapi-mesa [17.0.7-0ubuntu0.16.04.1 (now) -> 11.2.0-1ubuntu2 (xenial)]
Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
libgl1-mesa-glx libglapi-mesa
The following NEW packages will be installed:
aglfn{a} epstool{a} gnuplot-data{a} gnuplot-qt{a} gnuplot-tex{a} libaec0{a} libamd2.4.1{a} libarpack2{a} libblas-common{a} libblas3{a}
libcamd2.4.1{a} libccolamd2.9.1{a} libcholmod3.0.6{a} libcxsparse3.1.4{a} libfltk-gl1.3{a} libfltk1.3{a} libgfortran3{a} libgl2ps0{a}
libglpk36{a} libgraphicsmagick++-q16-12{a} libgraphicsmagick-q16-3{a} libhdf5-10{a} liblapack3{a} libmagick++-6.q16-5v5{a} liboctave4{a}
libopenblas-base{a} libosmesa6{a} libplot2c2{a} libpstoedit0c2a{a} libqhull7{a} libqrupdate1{a} libqt4-svg{a} libqt5scintilla2-12v5{a}
libqt5scintilla2-l10n{a} libsz2{a} libtext-unidecode-perl{a} libumfpack5.7.1{a} octave octave-common{a} octave-doc{a} pstoedit{a}
tex-common{a} texinfo{a}
0 packages upgraded, 43 newly installed, 2 downgraded, 0 to remove and 0 not upgraded.
Need to get 34.7 MB of archives. After unpacking 154 MB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://ppa.launchpad.net/octave/stable/ubuntu xenial/main amd64 liboctave4 amd64 4.2.2-1~octave~xenial2 [6,734 kB]
Get: 2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libblas-common amd64 3.6.0-2ubuntu2 [5,342 B]
.
.
.
Setting up octave (4.2.2-1~octave~xenial2) ...
Setting up octave-doc (4.2.2-1~octave~xenial2) ...
Setting up pstoedit (3.70-1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu10)
.
.
.
Octave is installed successfully now.
user@user:/home$ octave --version
GNU Octave, version 4.2.2 Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
Octave was configured for "x86_64-pc-linux-gnu".
Additional information about Octave is available at
http://www.octave.org.
Please contribute if you find this software useful. For more
information, visit http://www.octave.org/get-involved.html
Read http://www.octave.org/bugs.html to learn how to submit bug
reports. user@user:~/home$
sudo apt-get install libcheese7 && sudo apt-get install libcheese-gtk23
in terminal and retry. – kashish Sep 08 '15 at 16:44