如何在 Gnu Octave 中安装软件包?例如,我尝试使用 splines 软件包,将其下载到我的主目录中后,使用以下命令:
Octave1>> pkg install splines-1.0.7.tar.gz
我收到以下错误消息:
couldn't create installation directory /usr/share/octave/packages/3.2/splines-1.0.7
: Permission denied
error: called from `pkg>copy_files' in file /usr/share/octave/3.2.4/m/pkg/pkg.m near line 1431, column 7
error: called from:
error: /usr/share/octave/3.2.4/m/pkg/pkg.m at line 756, column 5
error: /usr/share/octave/3.2.4/m/pkg/pkg.m at line 287, column 7
答案1
以 SU 身份运行 Octave:
sudo octave
然后尝试和你一样的操作。
答案2
或者在运行 octavesudo -i
之前octave
,您必须下载并存储包到 /usr/share/octave/packages