Crux Installation Instructions

This page will walk you through the steps of installing Crux on your computer. Separate sections describe the installation for Linux, MacOS, and Windows. You have the choice of installing pre-compiled binaries or building Crux from the source code. The compiled binaries offer the easiest installation option. Only the Windows version of Crux supports the vendor specific file formats.

Downloading

Crux is freely available for download under an Apache 2.0 license. The current stable and development releases are available from the download page. Older releases can be found in the GitHub releases page. Here we will describe how to download the latest stable or development release from the download page.

  1. click on the list box under "Choose Download Type", and select the distribution you want. Available choices are:
    • Linux X86-64
    • MacOS X86-64
    • MacOS ARM64
    • Windows X86-64
    • Source
  2. Read the license agreements.
  3. At the bottom of the page there are two buttons:

    Stable Release

    Click on the button labeled "I agree to the licensing terms, download release x.x of Crux" to download the latest stable release of crux.

    Latest Development Release

    Click on the button labeled "I agree to the licensing terms, download the most recent build of Crux" to download the latest development version of crux.

    If a window pops up on your browser, click on the "Save" button.

Linux

Installing Pre-compiled Crux Binaries on Linux

  • The current Linux binary of Crux is compiled on Ubuntu 22.04 for X86-64, but should work on most Linux distributions. It requires that version 2.39 or later of the C runtime library be installed. You can determine which version of the C runtime library is installed by running
    ldd --version

  • Unpack and install the files

    The file you downloaded should be named something like crux-x.xx.Linux.x86_64 where x.xx is replaced with the current release version Move this file to a convenient location and unpack the file with this command:

    unzip crux-x.xx.Linux.x86_64.zip

    You should now have a new directory, crux-x.xx.Linux.x86_64, with two subdirectories, bin and doc. The crux programs are in the bin directory. You may want to move these files somewhere more convenient for you, but otherwise, that completes the installation! Skip ahead to Setting the PATH on Linux and MacOS for notes on how to run the executables.

Building Crux From Source on Linux

  • Prerequisites

    To build Crux from source on Linux you must have installed the following software:

    • gcc
    • g++
    • cmake (version 3.24 or later recommended)
    • make
    • git

    Building crux also requires the Proteowizard and Percolator libraries. These will automatically be copied from the Proteowizard and Percolator repositories and statically linked into crux.

  • The file you downloaded should be named something like crux-x.xx.source.tar.gz, where x.xx is replaced with the current release version.

  • Unpack the files

    Move the downloaded file to a convenient location and unpack it with this command.

    tar -zxvf crux-x.xx.Source.tar.gz
    A new directory named crux-x.xx.Source will be created and a long list of files will stream by as they are being put into the new directory.
  • Configure the build

    Note: These instructions refer to your home directory as $HOME. You can type $HOME in the commands or you can use the fully qualified path to your home directory which may be something like /home/yourname/. Note that you can find out the location of your home directory by logging in and typing pwd or echo $HOME.

    Move into the crux-x.xx.Source directory from step 1. Run the command

    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=<install directory> .

    where <install directory> is the location where you wish to install the crux programs. If you want crux to go in $HOME/bin, then <install directory> would be $HOME. The installation process will automatically put the programs in a directory called bin.

    Note, this configuration will build with optimizations turned on, and will not include debug symbols. To build with optimizations turned off, and debug symbols included, use the command:

    cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=<install directory> .
  • Build and install

    To complete the process, run these two commands.

  • make
    make install

    The crux programs are in the bin subdirectory of the <install directory> That completes the installation! Skip ahead to Setting the PATH on Linux and MacOS for notes on how to run the executables.

MacOS

Pre-compiled binaries of Crux are available for both MacOS 13 on X86-64 and MacOS 15 on Apple silicon (ARM64).

To install and use crux on MacOS you'll need to be familiar with the Terminal application.

Installing Pre-compiled Crux Binaries on MacOS

  • Unpack and install the files

    The file you downloaded should be named crux-x.xx.Darwin.x86_64.zip, or crux-x.xx.Darwin.arm64.zip, where x.xx is replaced with the most current release version. Move this file to a convenient location and unpack the file using the unzip command. For example,

    unzip crux-x.xx.Darwin.x86_64.zip

    You should now have a new directory, crux-x.xx.Darwin.x86_64, with two subdirectories bin, and doc. The crux programs are in the bin directory. You may want to move these files somewhere more convenient for you, but otherwise, that completes the installation! Skip ahead to Setting the PATH on Linux and MacOS for notes on how to run the executables.

Building Crux From Source on MacOS

  • Prerequisites

    To build Crux from source on MacOS you must have installed the following software:

    • MacOS 13 (Ventura) or later
    • XCode Command Line Tools
    • cmake (version 3.24 or later recommended)
    • make
    • git
    • gnutar (Apple's version of tar is incompatible with GNU's version of tar)

    Building crux also requires the Proteowizard and Percolator libraries. These will automatically be copied from the Proteowizard and Percolator repositories and statically linked into crux.

    Building Crux on MacOS requires a current version of XCode, and the XCode command line tools. Earlier versions of Crux had to be built using the GCC compilers, which are not supported by Apple. If you have the both the GCC and Apple compilers installed, you'll need to adjust the PATH environment variable so that the Apple compilers are found first. Alternatively, you can specify which compilers should be used by setting the CC, and CXX. For example,

    export CC=/usr/bin/gcc
    export CXX=/usr/bin/g++

    The programs gnutar, cmake, and git, can be installed from MacPorts or Homebrew.

  • Unpack the files

    Move the downloaded file to a convenient location and unpack it with this command.

    tar -zxvf crux-x.xx.Source.tar.gz
    A new directory named crux-x.xx.Source will be created and a long list of files will stream by as they are being put into the new directory.

  • Configure the build

    Note: These instructions refer to your home directory as $HOME. You can type $HOME in the commands or you can use the fully qualified path to your home directory which may be something like /home/yourname/. Note that you can find out the location of your home directory by logging in and typing pwd or echo $HOME.

    Move into the crux-x.xx.Source directory from step 1. Run the command

    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=<install directory> .

    where <install directory> is the location where you wish to install the crux programs. If you want crux to go in $HOME/bin, then <install directory> would be $HOME. The installation process will automatically put the programs in a directory called bin.

    Note, this configuration will build with optimizations turned on, and will not include debug symbols. To build with optimizations turned off, and debug symbols included, use the command:

    cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=<install directory> .
  • Build and install

    To complete the process, run these two commands.

  • make
    make install

    The crux programs are in the bin subdirectory of the <install directory> That completes the installation! Skip ahead to Setting the PATH on Linux and MacOS for notes on how to run the executables.

Setting the PATH on Linux and MacOS

  • On Linux and MacOS systems you can always run any of the programs by specifying its full path. For example,

    <install directory>/bin/crux comet

    In this final step of the installation, we'll set things up so that you can also run any of the programs by just typing its name. This is done with an environment variable called $PATH. $PATH is a list of places that the computer looks for executable programs. Find out what is in the current list with this command:

    echo $PATH

    The value returned might look something like this: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

    The first directory in this colon-separated list, /usr/local/bin, is the first place the computer looks for a program. If it doesn't find the program there it tries /usr/bin and so on down the list. You can either move the crux executable files into one of these directories already in your PATH, or you can add <install directory> to PATH with this command. (Remember to replace the word <install directory> with the actual location of your installation)

    export PATH=$PATH:<install directory>/bin

    Try 'echo $PATH' again to see that the change was made. <install directory>/bin should be at the end of the list. Now you can run the crux programs by just typing their names. Try this.

    crux comet

    The change to $PATH is only temporary. As soon as you close the window, the change will disappear. In order to make the change every time you log on, add the line export PATH=$PATH:<install directory>/bin to the file .bashrc located in your home directory. You will have to log on again for the change to take effect.

Windows

Installing Pre-compiled Crux Binaries on Windows

  • Prerequisites

    To run Crux with support for vendor specific file formats on Windows you must have installed the following software:

  • Unpack and install the files

    Browse to the downloaded file in Windows Explorer. Right click on the file and choose "Expand All ...". You should now have a new directory, crux-x.xx, with two subdirectories bin, and doc. The crux programs are in the bin directory. You may want to move these files somewhere more convenient for you, but otherwise, that completes the installation! Skip ahead to Setting the PATH on Windows for notes on how to run the executables.

Building Crux From Source on Windows

  • Prerequisites

    To build Crux from source on Windows you must have installed the following software:

    Older versions of Visual Studio will not be able to build Crux! You must have Visual Studio 2022 or later. Visual Studio 2022 Community Edition does work.

    wget, unzip, and git, must be included in the execution PATH for your system. See the section Setting the PATH on Windows for more information.

  • Download the file

    The file you downloaded should be named something like crux-x.xx.Source.zip, where x.xx is replaced with the most current release version.

  • Unpack the files

    Unpack the downloaded file using Windows Explorer. Right click on the file icon and click on "Extract All ...". A new directory named crux-x.xx.Source will be created containing the source code and documentation for Crux.

    Note Windows has a fixed maximum path length of 270 characters. The Crux build creates several levels of directories so it is very easy to exceed this limit. This will cause the build to fail. To avoid this problem we recommend keeping the Crux source and build trees very near the disk root (typically C:\).

  • Open the command line development environment.

    In the file explorer, open the open the folder \Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools. Double-click on the LaunchDevCmd.bat file (you may want to create a shortcut to this file on your desktop).

    This will launch a cmd shell configured to use the Microsoft development tools.

  • Configure

    In the cmd shell you just opened, move into the crux-x.xx.Source directory from step 1. Run the command

    cmake -DCMAKE_INSTALL_PREFIX:PATH=<install directory> -G "Visual Studio 16" -A X64 .

    where <install directory> is the location where you wish to install the crux programs. Note that, somewhat confusingly, Visual Studio 2019 is version 16.

    If you wish to disable support for vendor specific file formats, use this command instead

    cmake -DCMAKE_INSTALL_PREFIX:PATH=<install directory> -DINCLUDE_VENDOR_LIBRARIES=FALSE -G "Visual Studio 15 Win64" .

  • Build and install

    To complete the process run the commands

  • cmake --build . --config Release --target ALL_BUILD
    cmake --build . --config Release --target INSTALL

    Once you've run the configuration step you can also build and debug Crux from within the Visual Studio IDE. CMake will generate a file named crux.sln. Open this file in Visual Studio. You can select the build configuration: Release or Debug in the combo box under the menu bar.

    Note The Crux build will not automatically generate debugging symbols even if you've selected the Debug configuration. Right click on the Crux folder in the "Solution Explorer" and select "Properties" from the pop-up menu. In the "Properties" page select the "Debugging" item under the "Linker" properties. Set "Generate Debug Info" to "Yes".

    Changes made to the Visual Studio solution and project files will be lost the next time CMake regenerates the project.

Setting the PATH on Windows