如何修复在尝试安装 QtOctave 失败后收到的包问题?

Jos*_*nto 2 package-management 12.10 octave

我今天通过以下命令安装了 GNU Octave 3.6.4:

cd ~/octave-3.6.4
./configure
make
sudo make install
sudo ln -s /home/brentonhorne/octave-3.6.4/run-octave /usr/bin/octave
Run Code Online (Sandbox Code Playgroud)

它成功安装了它(即使没有最后一行,它也没有octave从命令行运行没有调用它的意义)。

在删除了 Quantal 软件中心目前唯一可用的版本(即 GNU Octave 3.6.3)之后,我才这样做了。

然后我尝试安装 qtoctave,因为它在我运行 GNU Octave 3.6.3 时被删除了sudo apt-get remove octave。运行后sudo apt-get install -f我收到错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up octave (3.6.3-2~ppa1~quantal2) ...
error: couldn't read directory /usr/local/share/octave/packages: No such file or directory
error: called from:
error:   /usr/local/share/octave/3.6.4/m/pkg/pkg.m at line 541, column 7
error:   /usr/local/share/octave/3.6.4/m/pkg/pkg.m at line 472, column 25

dpkg: error processing octave (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for menu ...
Errors were encountered while processing:
 octave
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

pro*_*201 5

小心,这会损坏您的安装!

找到没有正确安装的包并复制或记住包的名称:

sudo dpkg --list | grep octave
Run Code Online (Sandbox Code Playgroud)

尝试删除它(可能有一些错误):

sudo dpkg --remove <package>
Run Code Online (Sandbox Code Playgroud)

尝试清除

sudo dpkg --purge <package>
Run Code Online (Sandbox Code Playgroud)

再试试sudo apt-get -f install