Installing Heasoft-6.25 from source on Mac OS High Sierra (v 10.13.6)

Installing Heasoft from source can be somewhat of a pain. Luckily, there are some nice, easy to follow guides written up by fellow astronomers (see e.g., http://www.abigailstevens.com/2018/05/heasoft-install-mac/). However, I still ran into a major issue installing Heasoft version 6.25 on Mac OS High Sierra (v 10.13.6). I continually got the following error regardless of which compilers I was using:

“ld: library not found -ltinfo”

This error caused my build to fail. If you are also experiencing this error I hope to save you some time on fixing it. To solve the issue you need to install the ncurses library (brew install ncurses). Once installed, you can symlink the ncurses library in the following way (see here for the original post):

$ cd /usr/lib
$ ln -s libncurses.so.5 libtinfo.so.5
$ ln -s libtinfo.so.5 libtinfo.so

This allowed the make install to go through without any errors. I also have not run into any issues with heasoft by symlinking my libraries this way. Hope this helps!