Ubuntu 16.04 的 Octave 安装问题

Ubuntu 16.04 的 Octave 安装问题

我使用简单的 apt-get 命令安装了 octave,但后来不得不升级它。浏览了许多在线链接,我直接从网站下载了最新发布的文件并构建了它。但它开始出现许多错误,最终不得不清除并删除它。

之后,我使用稳定八度的存储库链接进行了全新安装。

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

但后来它开始出现以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
octave is already the newest version (4.0.2-1ubuntu5~octave~xenial1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up octave (4.0.2-1ubuntu5~octave~xenial1) ...
error: couldn't read directory /usr/local/share/octave/packages: No such file or directory
error: called from
    rebuild at line 29 column 7
    pkg at line 505 column 25
dpkg: error processing package octave (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 octave
E: Sub-process /usr/bin/dpkg returned an error code (1)

无法使八度运行。

答案1

最后,我找到了一个链接并解决了这个问题。

回复:在 ubuntu 14.04 上编译 Octave 4.0 时出错

我们需要在重新安装升级版本之前删除旧安装的 Octave 相关文件。然后要求 Ubuntu 继续之前的安装。

sudo rm -rf /usr/local/{bin,include,lib,libexec,share}/octave*
sudo rm -f  /usr/local/bin/mkoctfile*
sudo apt-get -f install

相关内容