OpenSuse13.2 安装GMT 5.4.2,opensuse13.25.4.2


Linux 系统版本:Opensuse 13.2

GMT版本: GMT5.4.2

根据README文件:

37 CMake
38 -----
39
40 Install CMake (>=2.8.5) from http://www.cmake.org/cmake/resources/software.html
41
42
43 Install netCDF library
44 ----------------------
45
46 For all major Linux distributions there are prepackaged development binaries
47 available. netCDF is also available on MacOSX trough the macports and fink
48 package managers.
49
50 Otherwise, get netCDF from http://www.unidata.ucar.edu/downloads/netcdf/.
51 You need at least version 4.0 with netCDF-4/HDF5 data model support (do not
52 disable HDF5/ZLIB in netCDF with --disable-netcdf-4).
53
54 Install CURL library
55 --------------------
56
57 To handle URLs we depend on libcurl so install via your favorite package
58 manager if it is not intrinsic to your Unix installation. Otherwise, get
59 it from https://curl.haxx.se.
60
61 GDAL (optional)
62 ---------------
63
64 To use the GDAL interface (ability to provide grids or images to be imported
65 via gdal) you must have the GDAL library and include files installed. Like
66 netCDF, GDAL is available through your favorite package manager on many *NIX
67 systems.
68
69
70 PCRE (optional)
71 ---------------
72
73 To use the PCRE interface (ability to specify regular expressions in some
74 search options, e.g., gmtconvert) you must have the PCRE library and include
75 files installed. PCRE is available through your favorite package manager
76 on many *NIX systems.
77
78
79 LAPACK (optional)
80 ---------------
81
82 To greatly speed up some linear algebra calculations (greenspline in
83 particular) you must have the LAPACK library and include files installed.
84 LAPACK is available through your favorite package manager on many *NIX
85 systems or in the case of OS X is built in.
86
87
88 Install support data
89 --------------------

 

 

 

 

 这里未安装 gdal、lapack等库

 

继续按照README.CMAKE的提示进行操作

下载gshhg-gmt-2.3.7.tar.gz,dcw-gmt-1.1.2.tar.gz

在GMT5.4.2解压目录cmake文件夹下,复制ConfigUserTemplate.cmake重命名为ConfigUser.cmake;

修改ConfigUser.cmake文件, 去掉 GSHHG 和 DCW_ROOT两项的注释。

然后在 ~/.bashrc 中增加两个变量

 export GSHHG_ROOT=/home/suse/software/gmt-5.4.2/gshhg-gmt-2.3.7/
 export DCW_ROOT=/home/suse/software/gmt-5.4.2/dcw-gmt-1.1.2/

创建目录build,

mkdir build 
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make install //这里我没有采用多线程运行 make -jx install

测试运行GMT命令

psxy

正常运行即安装成功。

 

相关内容

    暂无相关文章