问题
I'm new to Octave, attempting to install package 'miscellaneous' to use GNU Units. Installation fails. I tried:
apt-get install octave-miscellaneous
The deb package installs, but is not listed in Octave 3.8 (via >>pkg list). Then I tried:
> pkg install -forge miscellaneous
Octave 3.8 responds:
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.
回答1:
This is because your System's Octave installed by default is not the latest (3.8), but octaves own package manager tries to load.
apt-get install octave-miscellaneous
Installs to a different prefix, compared to your /opt/octave3.8, which you probably compiled your self.
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
...
回答2:
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.
Finally, you should not be mixing Octave packages installed via the Debian repositories and installed via Octave's pkg
.
来源:https://stackoverflow.com/questions/21383753/unable-to-install-octave-forge-miscellaneous-package-in-octave-3-8-ubuntu