我尝试使用安装 Octave
sudo apt-get install octave
我遇到了以下错误
Setting up octave (3.8.2-4) ...
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
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Errors were encountered while processing:
octave
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后我尝试使用安装它
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
但还是同样的错误。可能的原因是什么?我是 Ubuntu 新手,觉得很难。我已经搜索了很多次,但这个问题还没有解决
答案1
尝试查看文件夹 /usr/local/share/octave/packages 是否存在,如果存在,则尝试删除它(使用 root)并重新启动安装(要删除带有 shell 类型的文件夹:sudo rm -r“'文件夹名称”
答案2
先尝试 sudo apt-get 自动清理:
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics