octave 安装错误 - 依赖:gcc-5-base (= 5.3.1-14ubuntu2)

octave 安装错误 - 依赖:gcc-5-base (= 5.3.1-14ubuntu2)

我阅读了所有这篇文章并进行了搜索,但我的问题没有解决

我安装ubuntu 16.04.1 LTS

$sudo apt-get install octave
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:
 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
          Recommends: libopenblas-base but it is not going to be installed or
                      libatlas3-base but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

aptitute

$sudo aptitude install octave
The following NEW packages will be installed:
  aglfn{a} ca-certificates-java{a} default-jre-headless{a} gnuplot-data{a} gnuplot-tex{a} gnuplot-x11{a} java-common{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{ab} libgl2ps0{a} libglpk36{a} libgraphicsmagick++-q16-12{a} 
  libgraphicsmagick-q16-3{a} libhdf5-10{a} libjasper1{a} liblapack3{a} liblua5.1-0{a} libmagick++-6.q16-5v5{a} libmng2{a} 
  libmysqlclient20{a} liboctave3{a} libopenblas-base{a} libosmesa6{a} libplot2c2{a} libpstoedit0c2a{a} libqhull7{a} 
  libqrupdate1{a} libqscintilla2-12v5{a} libqscintilla2-l10n{a} libqt4-dbus{a} libqt4-declarative{a} libqt4-network{a} 
  libqt4-opengl{a} libqt4-script{a} libqt4-sql{a} libqt4-sql-mysql{a} libqt4-xml{a} libqt4-xmlpatterns{a} libqtcore4{a} 
  libqtdbus4{a} libqtgui4{a} libsz2{a} libtext-unidecode-perl{a} libumfpack5.7.1{a} libxml-libxml-perl{a} 
  libxml-namespacesupport-perl{a} libxml-sax-base-perl{a} libxml-sax-expat-perl{a} libxml-sax-perl{a} mysql-common{a} octave 
  octave-common{a} openjdk-8-jre-headless{a} pstoedit{a} qdbus{a} qt-at-spi{a} qtchooser{a} qtcore4-l10n{a} tex-common{a} 
  texinfo{a} 
0 packages upgraded, 70 newly installed, 0 to remove and 0 not upgraded.
Need to get 66.2 MB of archives. After unpacking 283 MB will be used.
The following packages have unmet dependencies:
 libgfortran3 : Depends: gcc-5-base (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.1 is installed.
The following actions will resolve these dependencies:

      Keep the following packages at their current version:
1)      libarpack2 [Not Installed]                         
2)      libcholmod3.0.6 [Not Installed]                    
3)      libgfortran3 [Not Installed]                       
4)      libhdf5-10 [Not Installed]                         
5)      liblapack3 [Not Installed]                         
6)      liboctave3 [Not Installed]                         
7)      libopenblas-base [Not Installed]                   
8)      libqrupdate1 [Not Installed]                       
9)      libumfpack5.7.1 [Not Installed]                    
10)     octave [Not Installed]                             

      Leave the following dependencies unresolved:         
11)     octave recommends libopenblas-base | libatlas3-base

当我想要安装另一个包时会显示这一行:

Depends: gcc-5-base (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.1 is installed.

例如g++

$ sudo apt install g++
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:
 g++ : Depends: g++-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我将 repo 设置为 ubunu 主站点并运行,apt-get update但没有解决

我跑apt-get update,,,apt-get upgradeaptget -f install

但......没有解决问题

答案1

我运行sudo aptitude octave并安装降级包

版本gcc-5-base 5.4.0已安装在系统上,但我将其降级为gcc-5-base 5.3.1

我运行此命令sudo aptitude octave并在命令提示符下输入.然后按enter显示下一个降级解决方案。然后我接受解决并输入Ygcc-5-base包降级并octave安装并且系统没有任何问题。

相关内容