Please, I have been trying to install GMT on my windows 10 laptop. I have been battling with this for days now…trying to source a solution on google, but all to no successful installation.
I have installed Cygwin and supported libraries that assist the GMT, but, I think I’m having issues appropriating the right algorithm on Cygwin to install the GMT.
I will be elated if I am helped with the step-to-step installation of GMT on Cygwin.
I have downloaded the following- GMT 6.1.1, gdal-3.2.0, dcw-gmt-1.1.4, and gshhg-gmt-2.3.7.
I’m a bit puzzled with those error messages. Is it really saying that chmod: command not found ??? Do you have experience with unix? That should ring some bells about the Cygwin installation.
Normally you should install dev- versions of the dependencies and then use cmake to build GMT like in any other unix system. But Cygwin is not really a supported environment. Native Windows binaries + MinGW gives a fine, no worries, unix type expeience in Win.
Thank you so much for your response, @Joaquim.
I have no experience with Unix. I usually use GUI Idle to code other languages. That’s why I really had to struggle with the installation, as I was literally, ignorantly duplicating codes in the Cygwin terminals.
Thanks again for your solution. So, it’s better I go with the .exe version of GMT, and use MinGW to access the GMT?
I ran the code on the Cygwin terminal, after creating a folder where I extracted the build files.
Also, please pardon my ignorance; I use windows and GUI’s to code and I’m not truly familiar with the Unix environment. I am willing to learn if it will assist in completing my assignment and for future application.
For our GMT workshops we recommend Windows users to install GMT from the Windows installer, then get Git for WIndows with bash and simply run GMT in that bash window.
Please mentor me @Joaquim
I am eager to learn! How do run it with bash, I even installed Ubuntu hoping to run GMT from its bash interface, but, didn’t just go through.
Super! Remember that you are actually running Ubuntu, so all tutorials, how-to’s etc. that are written for Ubuntu - you can use.
Here’s a simple primer that’ll make you set ut GMT from source in no time (if you want to do it the simple way, just run $ sudo apt install gmt). Execute the commands in the terminal:
WSL has very rough edges. I wouldn’t recommend it for un-experienced unix user. If one use it together with the file manager it will screw the file permissions in such a way that … I give up.
Chances are very high that you don’t even need bash to start with. Just use plain cmd, and when you need Google for Git for windows and install it.
Well, open a command window and type GMT commands in it like one do in any other shell environment. The limitation with cmd is that the batch language is either very poor or complicated but being a beginner you won’t need (yet) the more advanced features of the bash language. And at any time you can start using the bash provided by Git for Win.
I will go ahead with your instructions,
At the end of the installation, I am posed with the completion of plotting a simple map, topography map, and plot earthquake epicenters on a map.
I trust I could always reach out to you, if faced with other challenges.
I really appreciate your time, @Joaquim@Andreas
Once you have installed dependencies, try to continue with the rest of the commands I gave.
This is what you should do if you want to build gmt yourself from source. In that case do not run sudo apt install gmt or else, as Joaquim said, you may get an old version of gmt installed. If you don’t want to bother building it yourself, you may run sudo apt install gmt.
I agree with Joaquim that if you’re only going to do super simple oneliners, installing gmt on windows and using cmd is OK. But as soon as you want to do scripts that are > 2 lines, cmd becomes a royal pain in my opinion. If I could talk to my former self I would say “start to use bash immediately”. I wrote scripts in cmd for years. Now I refuse to touch it.