I downloaded GMAT and ran it according to the instructions:
$ ./GMAT-R2018a
./GMAT-R2018a: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
So I thought libpng was missing. So I downloaded, built and installed libpng 1.6.37 from source.
$ ./GMAT-R2018a
./GMAT-R2018a: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
So apparently I needed specifically version 1.2 of libpng, which I downloaded, built and installed from source:
$ ./GMAT-R2018a
./GMAT-R2018a: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
So apparently somehow GMAT couldn't see the file, so I made a symlink:
$ ln -s /usr/local/lib/libpng12.so.0 libpng12.so.0
$ ./GMAT-R2018a
./GMAT-R2018a: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
So I found a post somewhere saying that I should add a repository:
$ sudo add-apt-repository ppa:linuxuprising/libpng12
$ sudo apt update
$ sudo apt install libpng12-0
So now when I run GMAT, I get a new error:
$ ./GMAT-R2018a
./GMAT-R2018a: /usr/local/lib/libpng12.so.0: no version information available (required by /home/steen/GMAT/GMAT/R2018a/bin/../lib/libwx_gtk2u_core-3.0.so.0)
And now I'm all out of ideas. Anyone?
The main problem here is the libpng12, which is removed from the repositories after 16.04 LTS.
To install it use special PPA:
Then download and extract GMAT:
So you have to remove problematic library with: