无法安装Octave

我试图通过使用这些命令安装Octave :

sudo apt-add-repository ppa:octave/stable sudo apt-get update sudo apt-get install octave 

但我收到以下错误消息:

 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: libosmesa6 (>= 6.5.2-1) but it is not going to be installed or libgl1-mesa-glide3 but it is not installable E: Unable to correct problems, you have held broken packages. 

我该如何解决这个问题?

编辑 – apt-cache policy libosmesa6输出apt-cache policy libosmesa6

 libosmesa6: Installed: (none) Candidate: 10.1.3-0ubuntu0.4 Version table: 10.1.3-0ubuntu0.4 0 500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 10.1.0-4ubuntu5 0 500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 

Edit2-输出apt-cache policy octave

 octave: Installed: (none) Candidate: 4.0.0-3ubuntu2~octave~trusty1 Version table: 4.0.0-3ubuntu2~octave~trusty1 0 500 http://ppa.launchpad.net/octave/stable/ubuntu/ trusty/main amd64 Packages 3.8.1-1ubuntu1 0 500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 

这不是普遍的答案。 问题很复杂,并且在聊天中通过更长时间的分析解散了。

以下是聊天摘要。

 sudo apt-get install libosmesa6 sudo apt-get install libglapi-mesa 

它删除了很多软件包,例如ubuntu-desktop

 sudo apt-get install -f sudo apt-get install ubuntu-desktop 

从这里开始,我们使用了aptitude ,一个更好的问题解析器

 sudo aptitude install libgl1-mesa-dri 

现在删除了很多软件包,但是安装了ubuntu-desktop

 sudo aptitude install unity8 sudo aptitude install octave 

完成

最后在Ubuntu 14.04 64位机器上为我工作。

在终端中,安装:

 sudo apt-get build-dep octave sudo apt-get install libqt4-opengl-dev 

然后从源代码下载并构建Octave:

 wget ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.xz tar -xaf octave-4.0.0.tar.xz cd octave-4.0.0 ./configure make sudo make install 

这适用于我在实验室试过的所有机器。

打开终端并运行以下命令:

 sudo apt-get build-dep octave 

这将安装Octave的所有依赖项,

请参考这里

之后您可以使用您所遵循的安装

要么

  sudo add-apt-repository ppa:picaso/octave sudo apt-get update sudo apt-get install octave 

请参考这里