Upgrading NONMEM to Yosemite


Apple released their new OS (Yosemite) a few weeks ago. Unfortunately upgrading to the new system breaks the installation of NONMEM, PsN, and Pirana. Here’s what I did to get up and running again. Altogether this should take less than 20 minutes. Please note that I cannot be held liable for any damage caused directly or indirectly by following the advice below!

Step 1: You need to re-install gcc/gfortran. You can install from source, or from e.g. HomeBrew, but I just chose to take the binaries from this page which had just updated their versions. Download gcc and gfortran for Yosemite. Then in the console run:

cd ~/Downloads
sudo tar -xvf gcc-5.0-bin.tar -C /
sudo tar -xvf gfortran-5.0-bin.tar -C /

Step 2: Re-install the Apple developer tools for Yosemite. Download and install the ones for OSX 10.10.

Step 3: Now you are ready to re-install NONMEM. I used:

cd /Users/ronkeizer/Dropbox/Software/NONMEM/nm730CD_essential
sudo /bin/bash SETUP73 /Users/ronkeizer/Dropbox/Software/NONMEM/nm730CD_essential /opt/NONMEM/nm73g gfortran y ar same rec i

(But change the source and target folders to your own of course!)

Step 4: Don’t forget to update psn.conf if you installed to a new location. Use e.g.:

sudo nano /Library/Perl/5.16/PsN_4_2_0/psn.conf

to edit the system-wide configuration file or

nano ~/psn.conf

if you have a personal psn.conf file. Also, you might need to re-install some Perl modules for PsN:

sudo cpan -i Math::Random
sudo cpan -i Statistics::Distributions

Step 5: To make Pirana work again, the only thing you need to do is re-install XQuartz, download here

That’s all, folks!

Update Jan 7th 2015

If after upgrading you encounter the following error when running a model with PsN:

Pirana: starting execute on run10.mod
dyld: Library not loaded: /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib
Referenced from: /usr/bin/perl5.18
Reason: Incompatible library version: perl5.18 requires version 5.18.0 or later, but libperl.dylib provides version 5.16.0

in Pirana go to Settings –> Environment variables –> Set other environment variables. Add in the text-box:

DYLD_LIBRARY_PATH=

and save the settings. This will basically clear this variable from the environment, and PsN should run without errors again.