Setup instructions for Debian/Ubuntu and derived

Thanks to the power of debian, in order to install everything you need to build CamiTK, just type:

sudo apt update
sudo apt-get build-dep camitk
Copy/paste code snippets

You can easily copy all the bash code from this documentation by clicking on the Copy button in the top right corner of each code snippets… You can then paste in your terminal.

How to fix E: You must put some 'source' URIs in your sources.list

The error appears when you try to ask the system to get information about the camitk source packages but no source packages information (deb-src entries) are configured, see the Debian documentation. Basically you just need to add the repositories that contains the source code of the packages (so that apt-get can deduce which packages to install).

A simple way of doing this:

if ls /etc/apt/sources.list.d/*.sources >/dev/null 2>&1; then
    # Modern APT format (.sources)
    sudo cp -a /etc/apt/sources.list.d /etc/apt/sources.list.d.bak
    sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/*.sources
else
    # Legacy APT format (sources.list)
    sudo cp -a /etc/apt/sources.list{,.bak}
    sudo sed -i 's/^#\s*deb-src/deb-src/' /etc/apt/sources.list
fi

And then try again:

sudo apt update
sudo apt-get build-dep camitk
How to fix E: You must put some 'deb-src' URIs in your sources.list

The error appears when you try to ask the system to get information about the camitk source package but no source packages information (deb-src entries) are configured, see the Debian documentation. Basically you just need to add the repositories that contains the source code of the packages (so that apt-get can deduce which packages to install).

A simple way of doing this:

if ls /etc/apt/sources.list.d/*.sources >/dev/null 2>&1; then
    # Modern APT format (.sources)
    sudo cp -a /etc/apt/sources.list.d /etc/apt/sources.list.d.bak
    sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/*.sources
else
    # Legacy APT format (sources.list)
    sudo cp -a /etc/apt/sources.list{,.bak}
    sudo sed -i 's/^#\s*deb-src/deb-src/' /etc/apt/sources.list
fi

And then try again:

sudo apt update
sudo apt-get build-dep camitk
How to fix E: Unable to find a source package for camitk

Your distribution cannot automatically find the list of dependencies as it does not have any camitk source package (camitk was not included in the official repository). You have to specify the correct and precise list of dependency names on the command line by entering:

For Linux distributions derived from Debian 14 Forky or Ubuntu 26.04 LTS - Resolute Raccoon:

# Using Qt6
sudo apt install git build-essential cmake libvtk9-dev qt6-base-dev qt6-tools-dev qt6-scxml-dev xsdcxx libinsighttoolkit5-dev libfftw3-dev libgdcm-dev libgdcm-tools libvtkgdcm-dev libpython3-dev python3-dev python3-pip python3-venv pybind11-dev python3-pyside6.qtwidgets python3-vtk9

For Linux distributions derived from Debian 13 Trixie, Ubuntu 24.04 LTS - Noble Numbat:

# Using Qt6
sudo apt install git build-essential cmake libvtk9-dev qt6-base-dev qt6-tools-dev qt6-scxml-dev xsdcxx libinsighttoolkit5-dev libfftw3-dev libgdcm-dev libgdcm-tools libvtkgdcm-dev libpython3-dev python3-dev python3-pip python3-venv pybind11-dev python3-pyside6.qtwidgets python3-vtk9
Additional packages required for Debian 13 Trixie, Ubuntu 24.04 LTS - Noble Numbat and derived

If sudo apt-get build-dep camitk worked on your OS, you will also need to install the following additional packages:

# Installing python binding requirements
sudo apt install libpython3-dev python3-dev python3-pip python3-venv pybind11-dev python3-pyside2.qtwidgets python3-vtk9

Cleanup a previously installed version

If you had previously installed a CamiTK stable development environment, please uninstall the package first. Make sure also that you have nothing installed locally in your user $HOME/.config/CamiTK directory.