Installing Chaste using the Ubuntu package

For Ubuntu users, there is a package available to greatly ease installation of the Chaste source code. It requires an Ubuntu version of Intrepid or newer, as several dependencies are not available as Ubuntu packages in older versions. We have also had success installing Chaste on a virtual machine running Ubuntu in other versions of Linux, Mac OS X and Windows.

The package has been tested with all versions of Ubuntu from Intrepid (8.10) to Focal (20.04) inclusive, and will be adapted to new versions as soon as possible after they are released.

Each release of Chaste should work with all supported versions of Ubuntu at the time of the Chaste release. But note that the latest Chaste releases won't work with the oldest (unsupported) Ubuntus, and the older Chaste releases (and their associated bolt-on projects) probably won't work with the newest Ubuntus without some updating (to use newer dependencies and compilers). The development code should always work with all the currently supported versions of Ubuntu.

1. Accessing the Chaste Package

The package can be downloaded using your normal package manager (e.g. aptitude) by adding our repository to your configuration. This can be done by, for example, opening a terminal and running

sudo nano /etc/apt/sources.list.d/chaste.list

and, depending on your version of Ubuntu, add one of the following lines to the chaste.list text file:

Ubuntu Version Ubuntu codename Line to add
13.10 or older - deb legacy/
14.04 LTS trusty deb trusty/
14.10 utopic deb utopic/
15.04 vivid deb vivid/
15.10 wily deb wily/
16.04 LTS xenial deb xenial/
16.10 yakkety deb yakkety/
17.04 zesty deb zesty/
17.10 artful deb artful/
18.04 LTS bionic deb bionic/
18.10 cosmic deb cosmic/
19.04 disco deb disco/
19.10 eoan deb eoan/
20.04 LTS focal deb focal/
20.10 groovy deb groovy/
21.04 hirsute deb hirsute/
21.10 impish deb impish/
22.04 LTS jammy deb [signed-by=/usr/share/keyrings/chaste.asc] jammy/

The last component of the line depends on your version of Ubuntu, as listed at Type lsb_release -a to find this out if you don't already know it. Note that the trailing "/" is necessary!

Next, install the Chaste public licence key. Back in the terminal, type:

sudo apt-key adv --recv-keys --keyserver hkp:// 422C4D99

sudo wget -O /usr/share/keyrings/chaste.asc

Note that you also need to ensure you have enabled 'multiverse' packages; this is normally the default.

2. Getting the correct dependencies

After following point 1 above, you should be able to install the dependencies for Chaste by running:

sudo apt-get update
sudo apt-get install chaste-dependencies

You should now decide whether you want to be a Code User or a Code Developer.

  • Code Users - are people who want to work with a stable released version of the Chaste code (a new release is made roughly every six months).
  • Code Developers - (both internal and external to the core team) are people who want to work with the latest development version of the Chaste code, between the main stable releases.

See GettingStarted for more detail if you still aren't sure.

2a. For Code USERS (working with a release, rather than developers)

You can obtain the latest stable release of the Chaste source code from our GitHub repository:

git clone --recursive -b release Chaste

Finally, follow the CMake First Run guide to get up and running with Chaste.

Installing previous releases

If you want a specific version of Chaste, and do not want to stay up-to-date with new versions on the release branch from our Git repository, you can download the source code from our GitHub releases page, back to Release 3.0.

2b. For Code DEVELOPERS (or users working with the latest trunk code and projects)

To install the suggested packages:

# first, make aptitude aware of the latest changes 
sudo apt-get update
# then install
sudo apt-get install --install-recommends chaste-dependencies
sudo apt-get install `dpkg -s chaste-dependencies | egrep "^Suggests" | cut -d "," -f 1-111 --output-delimiter " " | cut -d ":" -f 2`

If you want to use eclipse to work with Chaste (as we do - recommended), after the above you will then need to:

If you don't want to use eclipse you can checkout at the command line. You can get information on the latest stable build on the external developer guide page.

If you have the necessary permissions, see also Check out a user project - to make a new user project, or get a copy of an existing one.

Manual adjustments

You can choose different blas/lapack implementations. Look particularly at the atlas packages, (apt-cache search libatlas to see the options). Use libatlas-sse2-dev on Intel, libatlas-3dnow-dev on AMD, libatlas-base-dev otherwise.

3. Possible issues

Errors after tests

Some of the older versions of Ubuntu (oneiric/precise) come with Boost 1.46.1, which unfortunately contains a bug (fixed in quantal / boost 1.48).

This bug leads to output like this, at the end of a test:

Running 4 tests

 ***** TestCell.hpp *****

Entering TestUpdateCellProliferativeTypes
Entering TestWithWntCellCycleModel
Entering TestWithStochasticWntCellCycleModel
Entering TestWntMutantVariantsAndLabelling
pure virtual method called
terminate called without an active exception
[csu7921:16267] *** Process received signal ***
[csu7921:16267] Signal: Aborted (6)
[csu7921:16267] Signal code:  (-6)
[csu7921:16267] [ 0] /lib/x86_64-linux-gnu/ [0x7f4f75a2ecb0]
[csu7921:16267] [ 1] /lib/x86_64-linux-gnu/ [0x7f4f75698445]
[csu7921:16267] [ 2] /lib/x86_64-linux-gnu/ [0x7f4f7569bbab]
[csu7921:16267] [ 3] /usr/lib/x86_64-linux-gnu/ [0x7f4f7620369d]
[csu7921:16267] [ 4] /usr/lib/x86_64-linux-gnu/ [0x7f4f76201846]
[csu7921:16267] [ 5] /usr/lib/x86_64-linux-gnu/ [0x7f4f76201873]
[csu7921:16267] [ 6] /usr/lib/x86_64-linux-gnu/ [0x7f4f7620228f]
[csu7921:16267] [ 7] /usr/lib/ [0x7f4f79df7466]
[csu7921:16267] [ 8] /usr/lib/ [0x7f4f79df755a]
[csu7921:16267] [ 9] /home/wolf1768/workspace/Chaste/lib/ [0x7f4f7db419dd]
[csu7921:16267] [10] /home/wolf1768/workspace/Chaste/lib/ [0x7f4f7db41a80]
[csu7921:16267] [11] /lib/x86_64-linux-gnu/ [0x7f4f7569dd3d]
[csu7921:16267] [12] /home/wolf1768/workspace/Chaste/lib/ [0x7f4f7daac2d6]
[csu7921:16267] *** End of error message ***
Aborted (core dumped)

Fortunately this doesn't affect the running of the tests, which execute normally, but just display errors on shutdown. As long as you see "OK!", everything is OK!

If you do see this in tests, then when running a compiled executable you may see this at the end:

terminate called after throwing an instance of 'Exception'

this is not a problem either, and executable should have run correctly.

If this really does offend you (it can be very annoying if you are doing development and/or memory testing), then precise (12.04 LTS) also makes boost 1.48 available which doesn't have this bug. Unfortunately this isn't the default and you have to install it manually. (NB: These instructions are for the release 3.1 package; with the latest beta you should be able to do just "sudo apt-get install libboost-serialization1.48-dev libboost-filesystem1.48-dev".)

  1. Remove the existing chaste-dependencies which the system thinks relies on boost 1.46.
    sudo apt-get remove chaste-dependencies
  2. List all the chaste dependencies with a command like this:
    apt-cache show chaste-dependencies | head -30
  3. Copy the names of the ones you want
  4. Replace libboost-serialization-dev and libboost-filesystem-dev with libboost-serialization1.48-dev and libboost-filesystem1.48-dev,
  5. Install them all (this can be done in multiple calls) with:
    sudo apt-get install <list of packages>

Old versions of Chaste

For release 2.0 of Chaste and earlier, note that 4 tests (TestQuadraticMesh, TestVoronoiTessellation, TestVertexMesh, and TestInventorVoronoiWriter) may be reported as failing. This is due to a different version of tetgen being used in Ubuntu. Release 2.1 packages tetgen in the Chaste distribution and so avoids the problem.

If working with older versions, installing tetgen 1.4.2 manually as described at InstallTetgenAndTetview (and ensuring that this version appears on your PATH before the system version) resolves the problems.

Last modified 3 months ago Last modified on Apr 14, 2022, 4:00:30 PM