我正在尝试安装八度使用以下命令:
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
-
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
答案1
这不是通用答案。问题很复杂,通过聊天中的更长时间的分析得以解决。
以下是聊天。
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
完毕
答案2
以下内容最终在 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
这在我实验室里试过的所有机器上都有效。