Installation Instructions
This page explains how to install Secondo and the tools it requires on your computer. The currently supported and CI-verified paths are a build from sources on Ubuntu / Debian, precompiled .deb binary packages for Ubuntu, and a build on macOS using Homebrew. Older distributions are covered by the historical installation guides. The build of Secondo from sources itself is explained on the Sources page.Which installation is right for you?
- Just want to try Secondo on Ubuntu → binary .deb packages (apt-get)
- Build or extend Secondo on Ubuntu / Debian → installation from sources
- macOS → installation with Homebrew
- Older distributions (Fedora, SuSE, older Ubuntu) → historical installation guides
Installation on Ubuntu / Debian (from sources)
The steps below install the tools required to compile
Secondo and then build the system from sources. They are
verified in continuous integration on Ubuntu 22.04, 24.04 and 26.04 (on the
Intel/AMD x86_64 architecture). Debian 13 (Trixie) works in exactly
the same way; the package names below are identical on Debian.
-
Install the build tools and libraries. These include the C/C++ compiler, Berkeley DB,
the Boost libraries, a Java Development Kit (
default-jdk) for the Java GUI, and SWI-Prolog for the optimizer:sudo apt-get update sudo apt-get install flex bison gcc g++ build-essential \ libdb5.3 libdb5.3-dev libdb5.3++ libdb5.3++-dev db5.3-util \ libjpeg-dev libgsl0-dev libreadline-dev librecode-dev \ libgmp-dev libgmp10 libncurses-dev libxml2-dev libboost-all-dev \ libbison-dev libfl-dev libquadmath0 nlohmann-json3-dev \ default-jdk swi-prolog swi-prolog-nox -
Get the sources and build Secondo. The build
environment (compiler, Berkeley DB, SWI-Prolog paths, ...) is derived
automatically from the installed tools; you only have to set
SECONDO_BUILD_DIRand source the detection script:export SECONDO_BUILD_DIR=$HOME/secondo source $SECONDO_BUILD_DIR/CM-Scripts/secondo-detect.sh
It is convenient to add these two lines to your~/.bashrc, so the environment is set up automatically in every new terminal:echo 'export SECONDO_BUILD_DIR=$HOME/secondo' >> ~/.bashrc echo 'source $SECONDO_BUILD_DIR/CM-Scripts/secondo-detect.sh' >> ~/.bashrc
Then download the sources and build the system as described on the Sources page (in short: runmakein$SECONDO_BUILD_DIR).
Binary Installation via .deb Packages (Ubuntu, apt-get)
For users who just want to try Secondo without compiling it, we provide precompiled .deb packages for Ubuntu 22.04, 24.04 and 26.04. They install Secondo and all of its dependencies within a few minutes via apt-get, and are the recommended starting point for new users. Developers who want to build their own extensions should instead build from sources as described above.
See the
Ubuntu installation
guide using apt-get for the full instructions. Note that these packages are built for
the x86_64/amd64 architecture only; on other architectures
(e.g. arm64) please build from sources.
Installation on macOS (Intel and Apple Silicon)
On macOS, all tools required by Secondo are installed with the Homebrew package manager — a separate SDK download is no longer needed. The steps below are verified on macOS 15 (Sequoia) and macOS 26 (Tahoe), on both Intel (x86_64) and Apple Silicon (arm64). Enter the commands in a terminal.
-
Install the Xcode command line tools (C/C++ compiler,
make, system headers):xcode-select --install
-
Install Homebrew (skip if it is already present); see
brew.sh:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install the build tools and libraries. These include SWI-Prolog for the
optimizer and a Java Development Kit for the Java GUI:
brew install flex bison berkeley-db gsl jpeg-turbo boost gmp \ libxml2 readline nlohmann-json swi-prolog openjdk@21Homebrew'sflex,bisonandopenjdk@21are "keg-only" and are not put on thePATHautomatically. Add flex and bison to your~/.zshrc:echo 'export PATH="$(brew --prefix bison)/bin:$(brew --prefix flex)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
For the JDK, follow thecaveatsprinted by Homebrew to make it visible to the system (or install an equivalent JDK 21, e.g. Temurin). -
Get the sources and build Secondo. The build
environment (compiler, Berkeley DB, SWI-Prolog paths, ...) is derived
automatically from the installed tools; you only have to set
SECONDO_BUILD_DIRand source the detection script:export SECONDO_BUILD_DIR=$HOME/secondo source $SECONDO_BUILD_DIR/CM-Scripts/secondo-detect.sh
It is convenient to add these two lines to your~/.zshrc, so the environment is set up automatically in every new terminal:echo 'export SECONDO_BUILD_DIR=$HOME/secondo' >> ~/.zshrc echo 'source $SECONDO_BUILD_DIR/CM-Scripts/secondo-detect.sh' >> ~/.zshrc
Then download the sources and build the system as described on the Sources page (in short: runmakein$SECONDO_BUILD_DIR).
Upgrading the macOS version
After an upgrade of the macOS operating system, the Xcode developer tools have to be reinstalled. If you have upgraded your system and the call of make
produces the following error message:
xcrun: error: invalid active developer paththen you have to reinstall the Xcode developer tools. To do so, start a terminal and enter:
xcode-select --installIn the upcoming dialog, click on the button
Installation and wait until the
installation is finished. After that, the make process should run
as before.
Installation Guides for Historical Distributions
Older operating-system releases (Fedora, SuSE, and older Ubuntu versions) were installed with per-version scripts that are no longer maintained. They are kept for reference on the historical installation guides page.