Supported versions: 7+ 

Mac OS X

Supported versions: 10.6+ 


Public git repository 

Installing RevBayes from source on Mac OS X

1) Make sure that you have a c++ compiler installed on your computer. GCC 4.2 (or higher) and Apple LLVM version 6.0 have been used successfully. If you don't have a c++ compiler, you can get it on a Mac when you download and install XCode.

2) Make sure that you have CMake installed. One option to install CMake is using homebrew: ruby -e "$(curl -fsSL"
brew install cmake

3) Download RevBayes from our github repository. You can either clone the repository using git by running the following command in the terminal
git clone revbayes-master
or you can download the zipped source code directly by clicking in the link somewhere on the right side. In this case you need to unzip the source files.
Remember where you downloaded the sources. You will need this directory later.

4) Open a terminal and go to the RevBayes source directory if you haven't already done so, e.g.,
cd revbayes-master
Next, go into the projects and then the cmake subdirectory:
cd projects/cmake
Now you can either build the standard version, e.g., for older Mac OS or Linux distributions using
This builds the standard RevBayes executable rb. Alternatively, you can build the MPI version using instead the
./ -mpi true
build scripts which produces the rb-mpi executable.

5) You should be ready to use RevBayes. We have listed below some potential issue to troubleshoot below.


1) Error cmake not found!
Please go to step 2.

2) Error can't find the libboost_filesystem.dylib library or Library not loaded: libboost_filesystem.dylib
The error you are getting can most likely be solved by the following steps (see also here: You basically need to add the directory to the boost libraries to your path variable. You may find that you have to export this DYLD_LIBRARY_PATH every time you open a new terminal window. To get around this, you can add this to your .bash_profile. This file lives in your home directory. To change this, open a new terminal window and you should be in the home directory. Use the text editor nano to create this file type:
cd ~
nano .bash_profile
export DYLD_LIBRARY_PATH=your_revbayes_directory/boost_1_60_0/stage/lib:$DYLD_LIBRARY_PATH
export PATH=your_revbayes_directory/projects/cmake:$PATH

This will open the nano editor and you can paste in the export DYLD_LIBRARY_PATH line above. Then save the file using ctrl^o and hit return, then exit using ctrl^x. Now quit the Terminal app and reopen it and the boost libraries will forever be in your path.

3) -bash: rb: command not found
The problem is that you tried to run RevBayes but your computer doesn't know where the executable is. The easiest way is to set add the directory in which you compiled RevBayes to your path variable. You can do this by following exactly the instructions given for problem 2).