📄 install
字号:
INSTALLING GLPK ON YOUR COMPUTER********************************Unpacking the distribution file-------------------------------The GLPK package (like all other GNU software) is distributed in theform of a packed archive. It is one file named `glpk-X.Y.tar.gz', where`X' is the major version number and `Y' is the minor version number;for example, the archive name might be `glpk-4.15.tar.gz'.In order to prepare the distribution for installation you should:1. Copy the GLPK distribution file to a working directory.2. Unpack the distribution file with the following command: gzip -d glpk-X.Y.tar.gz After unpacking the distribution file is automatically renamed to `glpk-X.Y.tar'.3. Unarchive the distribution file with the following command: tar -x < glpk-X.Y.tar It automatically creates the subdirectory `glpk-X.Y' containing the GLPK distribution.Configuring the package-----------------------After unpacking and unarchiving the GLPK distribution you shouldconfigure the package, i.e. automatically tune it for your platform.Normally, you should just `cd' to the directory `glpk-X.Y' and run the`configure' script, e.g. ./configureThe `configure' shell script attempts to guess correct values forvarious system-dependent variables used during compilation. It usesthose values to create a `Makefile' in each directory of the package.It also creates file `config.h' containing platform-dependentdefinitions. Finally, it creates a shell script `config.status' thatyou can run in the future to recreate the current configuration, a file`config.cache' that saves the results of its tests to speed upreconfiguring, and a file `config.log' containing compiler output(useful mainly for debugging `configure').Running `configure' takes about a few seconds. While it is running, itdisplays some messages that tell you what it is doing. If you don't wantto see the messages, run `configure' with its standard output redirectedto `dev/null'; for example, `./configure > /dev/null'.By default both static and shared versions of the GLPK library will becompiled. Compilation of the shared librariy can be turned off byspecifying the `--disable-shared' option to `configure', e.g. ./configure --disable-sharedIf you encounter problems building the library try using the aboveoption, because some platforms do not support shared libraries.The GLPK package has some optional features listed below. By defaultall these features are disabled. To enable a feature the correspondingoption should be passed to the configure script.--with-gmp Enable using the GNU MP bignum library This feature allows the exact simplex solver to use the GNU MP bignum library. If it is disabled, the exact simplex solver uses the GLPK bignum module, which provides the same functionality as GNU MP, however, it is much less efficient. For details about the GNU MP bignum library see its web page at <http://gmplib.org/>.--with-zlib Enable using the zlib data compression library This feature allows GLPK API routines and the stand-alone solver to read and write compressed data files performing compression and decompression "on the fly" (compressed data files are recognized by suffix `.gz' in the file name). It may be useful in case of large MPS files to save the disk space. For details about the zlib compression library see its web page at <http://www.zlib.net/>.--enable-dl The same as --enable-dl=ltdl--enable-dl=ltdl Enable shared library support (GNU)--enable-dl=dlfcn Enable shared library support (POSIX) Currently this feature is only needed to provide dynamic linking to ODBC and MySQL shared libraries (see below). For details about the GNU shared library support see the manual at <http://www.gnu.org/software/libtool/manual.html>.--enable-odbc Enable using ODBC table driver (libiodbc)--enable-odbc=unix Enable using ODBC table driver (libodbc) This feature allows transmitting data between MathProg model objects and relational databases accessed through ODBC. For more details about this feature see the supplement "Using Data Tables in the GNU MathProg Modeling Language" (doc/tables.*).--enable-mysql Enable using MySQL table driver (libmysql) This feature allows transmitting data between MathProg model objects and MySQL relational databases. For more details about this feature see the supplement "Using Data Tables in the GNU MathProg Modeling Language" (doc/tables.*).Compiling the package---------------------Normally, you can compile (build) the package by typing the command: makeIt reads `Makefile' generated by `configure' and performs all necessaryjobs.If you want, you can override the `make' variables CFLAGS and LDFLAGSlike this: make CFLAGS=-O2 LDFLAGS=-sTo compile the package in a different directory from the one containingthe source code, you must use a version of `make' that supports `VPATH'variable, such as GNU `make'. `cd' to the directory where you want theobject files and executables to go and run the `configure' script.`configure' automatically checks for the source code in the directorythat `configure' is in and in `..'. If for some reason `configure' isnot in the source code directory that you are configuring, then it willreport that it can't find the source code. In that case, run `configure'with the option `--srcdir=DIR', where DIR is the directory that containsthe source code.Some systems require unusual options for compilation or linking thatthe `configure' script does not know about. You can give `configure'initial values for variables by setting them in the environment. Usinga Bourne-compatible shell, you can do that on the command line likethis: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configureOr on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configureHere are the `make' variables that you might want to override withenvironment variables when running `configure'.For these variables, any value given in the environment overrides thevalue that `configure' would choose:CC: C compiler program. The default is `cc'.INSTALL: Program used to install files. The default value is `install' if you have it, otherwise `cp'.For these variables, any value given in the environment is added to thevalue that `configure' chooses:DEFS: Configuration options, in the form `-Dfoo -Dbar ...'.LIBS: Libraries to link with, in the form `-lfoo -lbar ...'.Checking the package--------------------To check the package, i.e. to run some tests included in the package,you can use the following command: make checkInstalling the package----------------------Normally, to install the GLPK package you should type the followingcommand: make installBy default, `make install' will install the package's files in`usr/local/bin', `usr/local/lib', etc. You can specify an installationprefix other than `/usr/local' by giving `configure' the option`--prefix=PATH'. Alternately, you can do so by consistently giving avalue for the `prefix' variable when you run `make', e.g. make prefix=/usr/gnu make prefix=/usr/gnu installAfter installing you can remove the program binaries and object filesfrom the source directory by typing `make clean'. To remove all filesthat `configure' created (`Makefile', `config.status', etc.), just type`make distclean'.The file `configure.ac' is used to create `configure' by a programcalled `autoconf'. You only need it if you want to remake `configure'using a newer version of `autoconf'.Uninstalling the package------------------------To uninstall the GLPK package, i.e. to remove all the package's filesfrom the system places, you can use the following command: make uninstall========================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -