The most basic way to install a package on your system is to build the packages from source yourself. Alternatively, you can use your operating system’s package manager to download pre-compiled files and install them. The latter choice is easier and faster. However, we recommend that you build the Mandatory dependencies yourself from source (all necessary commands and links are given in the respective section). Here are some basic reasons behind this recommendation.
Based on your package manager, you can use any of the following commands to install the mandatory and optional dependencies. If your package manager isn’t included in the list below, please send us the respective command, so we add it. Gnuastro itself if also already packaged in some package managers (for example Debian or Homebrew).
As discussed above, we recommend installing the mandatory dependencies manually from source (see Mandatory dependencies). Therefore, in each command below, first the optional dependencies are given. The mandatory dependencies are included after an empty line. If you would also like to install the mandatory dependencies with your package manager, just ignore the empty line.
For better archivability and compression ratios, Gnuastro’s recommended tarball compression format is with the Lzip program, see Release tarball. Therefore, the package manager commands below also contain Lzip.
apt-get(Debian-based OSs: Debian, Ubuntu, Linux Mint, etc)
Debian is one of the oldest
It thus has a very extended user community and a robust internal structure and standards.
All of it is free software and based on the work of volunteers around the world.
Many distributions are thus derived from it, for example Ubuntu and Linux Mint.
This arguably makes Debian-based OSs the largest, and most used, class of GNU/Linux distributions.
All of them use Debian’s Advanced Packaging Tool (APT, for example
apt-get) for managing packages.
$ sudo apt-get install ghostscript libtool-bin libjpeg-dev \ libtiff-dev libgit2-dev lzip \ \ libgsl0-dev libcfitsio-dev wcslib-dev
Gnuastro is packaged in Debian (and thus some of its derivate operating systems). Just make sure it is the most recent version.
yum(Red Hat-based OSs: Red Hat, Fedora, CentOS, Scientific Linux, etc)
Red Hat Enterprise Linux (RHEL) is released by Red Hat Inc.
RHEL requires paid subscriptions for use of its binaries and support.
But since it is free software, many other teams use its code to spin-off their own distributions based on RHEL.
Red Hat-based GNU/Linux distributions initially used the “Yellowdog Updated, Modifier” (YUM) package manager, which has been replaced by “Dandified yum” (DNF).
If the latter isn’t available on your system, you can use
yum instead of
dnf in the command below.
$ sudo dnf install ghostscript libtool libjpeg-devel \ libtiff-devel libgit2-devel lzip \ \ gsl-devel cfitsio-devel wcslib-devel
macOS is the operating system used on Apple devices. macOS does not come with a package manager pre-installed, but several widely used, third-party package managers exist, such as Homebrew or MacPorts. Both are free software. Currently we have only tested Gnuastro’s installation with Homebrew as described below.
If not already installed, first obtain Homebrew by following the instructions at https://brew.sh.
Homebrew manages packages in different ‘taps’.
To install WCSLIB (discussed in Mandatory dependencies) via Homebrew you will need to
brewsci/science first (the tap may change in the future, but can be found by calling
brew search wcslib).
$ brew install ghostscript libtool libjpeg libtiff \ libgit2 lzip \ \ gsl cfitsio $ brew tap brewsci/science $ brew install wcslib
Arch Linux is a smaller GNU/Linux distribution, which follows the KISS principle (“keep it simple, stupid”) as a general guideline. It “focuses on elegance, code correctness, minimalism and simplicity, and expects the user to be willing to make some effort to understand the system’s operation”. Arch Linux uses “Package manager” (Pacman) to manage its packages/components.
$ sudo pacman -S ghostscript libtool libjpeg libtiff \ libgit2 lzip \ \ gsl cfitsio wcslib
zypper(openSUSE and SUSE Linux Enterprise Server)
SUSE Linux Enterprise Server61 (SLES) is the commercial offering which shares code and tools.
Many additional packages are offered in the Build Service62.
openSUSE and SLES use
zypper (cli) and YaST (GUI) for managing repositories and
$ sudo zypper install ghostscript_any libtool pkgconfig \ cfitsio-devel gsl-devel libcurl-devel \ libgit2-devel libjpeg62-devel libtiff-devel \ wcslib-devel
When building Gnuastro, run the configure script with the following
CPPFLAGS environment variable:
$ ./configure CPPFLAGS="-I/usr/include/cfitsio"
Usually, when libraries are installed by operating system package managers, there should be no problems when configuring and building other programs from source (that depend on the libraries: Gnuastro in this case). However, in some special conditions, problems may pop-up during the configuration, building, or checking/running any of Gnuastro’s programs. The most common of such problems and their solution are discussed below.
Not finding library during configuration: If a library is installed, but during Gnuastro’s
$ ./configure LDFLAGS="-L/path/to/lib"
Not finding header (.h) files while building: If a library is installed, but during Gnuastro’s
$ ./configure CPPFLAGS="-I/path/to/include"
Gnuastro’s programs don’t run during check or after install:
If a library is installed, but the programs don’t run due to linking problems, set the
$ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/installed/lib"