From Bio++ Wiki
Jump to: navigation, search

How to install Bio++.

Lastest release : Bio++ 2.2.0

Ubuntu/Debian packages

Bio++ 2.1 packages (libbpp-core, libbpp-seq, etc.) are available in the Ubuntu and Debian standard repositories. They can be installed using your usual package/program manager.

Warning: as of June 30, 2012, there is an issue with the Ubuntu popgen package. If you want to use this part of the library, please use the package from the custom repository instead, or compile from source, or switch to the development version.

Packages for version 2.2.0. have not been uploaded yet, and are only available from the custom repository.

Ubuntu/Debian packages (custom repository)

A local repository is available for architectures i386 and amd64, containing additional programs built against the libraries.

Use your favorite apt manager to add the following line to your sources.list :

deb Trusty main

You will also need to add the key that was used to sign the packages : <source lang="bash"> wget sudo apt-key add biopp.gpg.key </source>

Reload the packages list and then look for "Bio++" packages. That's all!

Packages are built with an Ubuntu system. Here are the version correspondences:

Bio++ version Ubuntu version Distribution code name
2.0.3 11.10 Oneiric
2.1.0 13.10 (LTS) Saucy
2.2.0 14.04 (LTS) Trusty

Make sure to use the appropriate distribution name in your 'source.list'.

RPM packages

RPM packages (version >= 2.0.3) are available at

Additional RPMs for Mageia 4 are available at


DMG packages are available at (compiled with a MacIntel computer).

Compiling from source

Compiling from source is necessary when superuser rights are not available or to install Bio++ to a non-standard location (useful when several Bio++ versions coexist on a system).


The easiest way to compile from source is to download the Bio++ automatic installer, edit the script header to match your system, and run it.

For instance, to download the sources in $HOME/local/bpp/latest/sources and install the libraries in $HOME/local/bpp/latest/lib and $HOME/local/bpp/latest/include, one would enter :

mkdir -p $bpp_dir/sources
cd $bpp_dir/sources
chmod +x
gedit # set PATH_INSTALL to $bpp_dir, on line 16

Download the source archives individually. The compilation and installation procedure is then the same as for compiling the development version.


Development version

git and CMake are needed to retrieve and compile the source files. They can be installed through the git and cmake packages in Ubuntu/Debian repositories, and should be present on most servers. You can check whether they are installed on your system simply by typing : <source lang="bash"> git cmake </source>

Installing Bio++ in a custom location greatly helps in compiling and running different programs depending on different Bio++ versions. This section therefore demonstrates how to download the sources in $HOME/local/bpp/dev/sources and install the libraries in $HOME/local/bpp/dev/lib and $HOME/local/bpp/dev/include.

We start by creating the directory :

mkdir -p $bpp_dir/sources
Getting the source files

This is done with git. Git repository is available from GitHub.

You need to download only the components of the library that you want to use. The bpp-core and bpp-seq components are required by all others, which are otherwise independent. (Example is given for bpp-popgen and bpp-phyl.)

cd $bpp_dir/sources
git clone
git clone
git clone
git clone

At this point the sources directory should contain three subdirectories.

Compiling and installing

All desired components must be compiled and installed successively, starting with bpp-core and bpp-seq. Repeat the following steps (example given for bpp-core) :

cd bpp-core
cmake -DCMAKE_INSTALL_PREFIX=$bpp_dir . # prepare compilation
make # compile
make install # move files to the installation directory

That's it ! The libraries are now installed. For more information on how to compile and run Bio++ dependent programs, see the Usage pages.

  • Environment. If you install lour libraries in a non standard directory, you should tell where the dynamic libraries are. For example, with bash shell, you can add in your .bashrc:
export CPATH=$CPATH:path_to_the_library/include    # for compilation
export LIBRARY_PATH=$LIBRARY_PATH:path_to_the_library/lib    # for compilation
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_the_library  # for execution
  • Debugging symbols. Usage of a debugger is possible if the option -D CMAKE_BUILD_TYPE=Debug is added to the cmake command line.
  • On some systems, 64-bits libraries have to be installed in lib64/ directories instead of just lib/. This can be achieved by passing the -DLIB_SUFFIX=64 option to cmake.
Staying up-to-date

To update the libraries the basic procedure is :

cd bpp-core
git pull # retrieve changes
cmake ./ # update files list
make install

Alternatively, the following script can be used :


cd $HOME/local/bpp/dev/sources
for d in bpp-core bpp-seq bpp-phyl bpp-popgen bpp-raa bpp-qt; do
  if [[ ! -e $d ]]; then
    echo -e "Skip $d (does not exist).\n"
  echo "Updating $d..."
  cd $d/
  git pull
  cmake .
  if make; then
    echo "Installing..."
    make install >/dev/null
    echo "Compilation error in '$d/'. Abort"
    cd ..
  cd ..

Older versions

See also Installation (old page).

Former versions of libraries and API documentation are available from " here. Browsable documentation is only available for the previous release of Bio++. Older documentation must be downloaded.

Installing a previous version of the libraries is necessary when maintaining or modifying programs that depend on those libraries. The preferred procedure is to compile from sources. From version 1.9, the installation procedure is the same as for the development version. Source files can be found at


Note that version 1.8 uses autotools.