博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
OpenSuse13.2 安装GMT 5.4.2
阅读量:6708 次
发布时间:2019-06-25

本文共 2881 字,大约阅读时间需要 9 分钟。

Linux 系统版本:Opensuse 13.2

GMT版本: GMT5.4.2

http://gmt.soest.hawaii.edu/projects/gmt/wiki/Download

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

均放在一个目录下面如:/home/suse/software

根据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的提示进行操作

 

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

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

106 # Set path to GSHHG Shoreline Database [auto]:107 set (GSHHG_ROOT "gshhg_path")108 109 # Copy GSHHG files to $/coast [FALSE]:110 set (COPY_GSHHG TRUE)111 112 # Set path to DCW Digital Chart of the World for GMT [auto]:113 set (DCW_ROOT "dcw-gmt_path")114 115 # Copy DCW files to $/dcw [FALSE]:116 set (COPY_DCW TRUE)

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

export GSHHG_ROOT=/home/suse/software/gshhg-gmt-2.3.7/ export DCW_ROOT=/home/suse/software/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 pscoast ...

运行 gmt-5.4.2/doc/examples/ex01/example_01.sh

bash example_01.sh

运行结果:

 

正常运行即安装成功。

 

转载于:https://www.cnblogs.com/hawlee/p/7269457.html

你可能感兴趣的文章
篮球术语
查看>>
Apache代理80端口
查看>>
Android Demos
查看>>
常用的PHP正则表达式汇总
查看>>
HDU 3215 The first place of 2^n (数论-水题)
查看>>
android之PackageManager简单介绍
查看>>
tsinsen A1067. Fibonacci数列整除问题 dp
查看>>
把普通的git库变成bare库
查看>>
[LeetCode]Swap Nodes in Pairs 成对交换
查看>>
C# VS预生成事件命令行 和 生成后事件命令行
查看>>
Chapter 1 Securing Your Server and Network(1):选择SQL Server运行账号
查看>>
JAVA程序猿面试题汇总
查看>>
Java基础复习笔记系列 九 网络编程
查看>>
[LeetCode] Edit Distance 编辑距离
查看>>
奇怪吸引子---Chua
查看>>
C与C++在const用法上的区别
查看>>
malloc的内存分配原理
查看>>
[控件] TranformFadeView
查看>>
使用Node.JS监听文件夹变化
查看>>
Javascript 笔记与总结(2-6)var
查看>>