I want to install the package dataframe
of Octave on one of my servers, which does not have internet access. I used my laptop to download dataframe-1.1.0.tar.gz
. I wonder how I can install it on my server manually.
问题:
回答1:
In the README.html of Octave 4.0.0 folder you can find the following passage:
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.
What you need to do for other packages, which are not included with Octave, is: download the package from http://octave.sourceforge.net/packages.php. Then put the package in the src folder and modify build_packages.m respectively before executing it.
回答2:
According to the Octave documentation:
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.