手动安装 Octave 包

Install Octave Package Manually

我想在我的一台服务器上安装 Octave 的软件包 dataframe,但该服务器无法访问 Internet。我用笔记本电脑下载 dataframe-1.1.0.tar.gz。我想知道如何手动将它安装到我的服务器上。

在Octave 4.0.0文件夹的README.html中可以找到下面这段话: Included Octave Forge Packages A number of Octave-Forge packages have been included with Octave, however they must be installed in order to use them. To install: • Start Octave and then open the build_packages.m file found in the src folder where Octave was installed. • Run the script build_packages.m to build and install the packages. Installation is a one-time procedure. After installation packages must still be loaded in order to use them with the pkg load PACKAGENAME command. Other packages are available from Octave-Forge. 对于 Octave 未包含的其他软件包,您需要做的是:从 http://octave.sourceforge.net/packages.php 下载软件包。然后把包放到src文件夹下,分别修改build_packages.m再执行

根据 Octave 文档:

37.1 Installing and Removing Packages

Assuming a package is available in the file image-1.0.0.tar.gz it can be installed from the Octave prompt with the command

pkg install image-1.0.0.tar.gz

If the package is installed successfully nothing will be printed on the prompt, but if an error occurred during installation it will be reported. It is possible to install several packages at once by writing several package files after the pkg install command. If a different version of the package is already installed it will be removed prior to installing the new package. This makes it easy to upgrade and downgrade the version of a package, but makes it impossible to have several versions of the same package installed at once.