简体   繁体   English

无法在 Octave 3.8 Ubuntu 中安装 Octave-forge 杂项包

[英]Unable to install octave-forge Miscellaneous package in Octave 3.8 Ubuntu

I'm new to Octave, attempting to install package 'miscellaneous' to use GNU Units.我是 Octave 的新手,试图安装包“杂项”以使用 GNU 单元。 Installation fails.安装失败。 I tried:我试过了:

apt-get install octave-miscellaneous apt-get 安装八度杂项

The deb package installs, but is not listed in Octave 3.8 (via >>pkg list). deb 包已安装,但未在 Octave 3.8 中列出(通过 >>pkg 列表)。 Then I tried:然后我尝试:

> pkg install -forge miscellaneous

Octave 3.8 responds: Octave 3.8 回应:

error: element number 1 undefined in return list
error: called from:
error:   /opt/octave3.8/share/octave/3.8.0/m/pkg/private/get_forge_pkg.m at line 40, column 14
error:   /opt/octave3.8/share/octave/3.8.0/m/pkg/private/get_forge_download.m at line 26, column 12

I've searched quite a bit and have not found what I am doing wrong.我已经搜索了很多,但没有发现我做错了什么。

Considering the error message, and the location from where the error is throw, this comes from a problem reading the page of the miscellaneous package.考虑到错误消息,以及抛出错误的位置,这来自读取杂项包页面的问题。 The weird error message is because of this bug .奇怪的错误信息是因为这个错误

So make sure Octave is able to use urlread (try with some random file you know it exists), and that you didn't made any typo when entering the package name.因此,请确保 Octave 能够使用urlread (尝试使用一些您知道它存在的随机文件),并且在输入包名称时没有输入任何拼写错误。

Finally, you should not be mixing Octave packages installed via the Debian repositories and installed via Octave's pkg .最后,您不应混合通过 Debian 存储库安装的 Octave 软件包和通过 Octave 的pkg安装的 Octave 软件包。

This is because your System's Octave installed by default is not the latest (3.8), but octaves own package manager tries to load.这是因为您的系统默认安装的 Octave 不是最新的 (3.8),而是 Octaves 自己的包管理器尝试加载。

apt-get install octave-miscellaneous

Installs to a different prefix, compared to your /opt/octave3.8, which you probably compiled your self.与您自己编译的 /opt/octave3.8 相比,安装到不同的前缀。

Here , you can see where the files are installed. 在这里,您可以看到文件的安装位置。

The solution would be to install the miscellaneous packages yourself.解决方案是自己安装杂项包。 Note, that you will probably need to run octave as root for the installation, or give your user write permissions to /opt/octave3.8/share ...请注意,您可能需要以 root 身份运行 Octave 进行安装,或者授予您的用户对/opt/octave3.8/share写权限...

For anyone coming from RHEL/Centos/Fedora distributions, use:对于来自 RHEL/Centos/Fedora 发行版的任何人,请使用:

dnf search octave-miscellaneous
dnf install -y octave-miscellaneous

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM