在Ubuntu 16上安装Octave软件包 [英] Install Octave packages on ubuntu 16
问题描述
我尝试了几个命令将软件包optim
安装到Ubuntu 16.10
中的Octave中以使用功能xcorr
,但是我不幸失败了.
I tried several commands to install the package optim
into my Octave in Ubuntu 16.10
to use the function xcorr
, but I miserably failed.
其中一些命令是:
- sudo apt-get install octave-optim
- sudo apt-get install liboctave-dev
- sudo apt-get install octave-signal
- sudo apt-get install octave-pkg-dev
有人可以向我解释一下,还是有人知道如何在Ubuntu 16中安装软件包?
运行上述命令后,我重新启动了Octave,但命令xcorr()
仍返回错误:
Can somebody explain me or does somebody know how to install the packages in Ubuntu 16?
After running the above-mentioned commands, I restarted Octave but the command xcorr()
was still returning the error:
警告:"xcorr"功能属于来自 已安装但尚未加载的Octave Forge.加载 程序包,在八度提示下运行"pkg load signal".
warning: the 'xcorr' function belongs to the signal package from Octave Forge which you have installed but not loaded. To load the package, run 'pkg load signal' from the Octave prompt.
不幸的是,"pkg"返回:
Unfortunately, 'pkg' returns:
没有找到命令'pkg',您的意思是:从软件包中命令'pig' 软件包``peg''(宇宙)中的``bsdgames''(宇宙)命令``peg'' 来自软件包"pki-tools"(通用)的命令"pki" 软件包"strongswan-starter"(主)软件包中的命令"dpkg" 软件包'util-linux'中的'dpkg'(主要)命令'pg'(主要)命令 软件包"ekg"中的"ekg"(Universe)软件包中的"ekg"命令 'ekg-gtk'(通用)pkg:找不到命令
No command 'pkg' found, did you mean: Command 'pig' from package 'bsdgames' (universe) Command 'peg' from package 'peg' (universe) Command 'pki' from package 'pki-tools' (universe) Command 'pki' from package 'strongswan-starter' (main) Command 'dpkg' from package 'dpkg' (main) Command 'pg' from package 'util-linux' (main) Command 'ekg' from package 'ekg' (universe) Command 'ekg' from package 'ekg-gtk' (universe) pkg: command not found
推荐答案
请先在Octave命令提示符下键入pkg load signal
,因为您已经安装了它.要在每次启动Octave时自动加载它,请创建〜/.octaverc文件,并在文件内部添加行pkg load signal
.
Please type pkg load signal
in the Octave command prompt, as you have already have it installed. To auto-load it everytime you start Octave, create ~/.octaverc file and add the line pkg load signal
inside the file.
如果将来尚未安装所需的pkg,则需要使用pkg install -forge <pkgname>
进行安装,例如pkg install -forge io
.同样,您将需要如前所述加载它.
If in future, the pkg that you need is not currently installed, you will need to install it with pkg install -forge <pkgname>
e.g. pkg install -forge io
. Similarly, you will need to load it as described earlier.
希望有帮助.
这篇关于在Ubuntu 16上安装Octave软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!