I’m afraid you are suffering from the libstd++ problem discussed here and while #45582 is not solved, your option is to install GMT with a package manager or build it yourself (not difficult). See general instructions for Linux here
libstd++