GNU Astronomy Utilities


Previous: , Up: Dependencies   [Contents][Index]


3.1.4 Dependencies from package managers

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.

  1. Your operating system’s pre-built software might not be the most recent release. For example, Gnuastro itself is also packaged in some package managers. For the list see: https://repology.org/project/gnuastro/versions. You will notice that Gnuastro’s version in some operating systems is more than 10 versions old! It is the same for all the dependencies of Gnuastro.
  2. For each package, Gnuastro might preform better (or require) certain configuration options that your distribution’s package managers did not add for you. If present, these configuration options are explained during the installation of each in the sections below (for example, in CFITSIO). When the proper configuration has not been set, the programs should complain and inform you.
  3. For the libraries, they might separate the binary file from the header files which can cause confusion, see Known issues.
  4. Like any other tool, the science you derive from Gnuastro’s tools highly depend on these lower level dependencies, so generally it is much better to have a close connection with them. By reading their manuals, installing them and staying up to date with changes/bugs in them, your scientific results and understanding (of what is going on, and thus how you interpret your scientific results) will also correspondingly improve.

Based on your package manager, you can use any of the following commands to install the mandatory and optional dependencies. If your package manager is not included in the list below, please send us the respective command, so we add it. 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 GNU/Linux distributions77. 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.

Mandatory dependencies

Without these, Gnuastro cannot be built, they are necessary for input/output and low-level mathematics (see Mandatory dependencies)!

$ sudo apt-get install libgsl-dev libcfitsio-dev \
                       wcslib-dev
Optional dependencies

If present, these libraries can be used in Gnuastro’s build for extra features, see Optional dependencies.

$ sudo apt-get install ghostscript libtool-bin \
                       libjpeg-dev libtiff-dev
                       libgit2-dev curl lzip
Programs to view FITS images or tables

These are not used in Gnuastro’s build. They can just help in viewing the inputs/outputs independent of Gnuastro!

$ sudo apt-get install saods9 topcat

Gnuastro is packaged in Debian (and thus some of its derivate operating systems). Just make sure it is the most recent version.

dnf
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 is not available on your system, you can use yum instead of dnf in the command below.

Mandatory dependencies

Without these, Gnuastro cannot be built, they are necessary for input/output and low-level mathematics (see Mandatory dependencies)!

$ sudo dnf install gsl-devel cfitsio-devel \
                   wcslib-devel
Optional dependencies

If present, these libraries can be used in Gnuastro’s build for extra features, see Optional dependencies.

$ sudo dnf install ghostscript libtool \
                   libjpeg-devel libtiff-devel \
                   libgit2-devel lzip curl
Programs to view FITS images or tables

These are not used in Gnuastro’s build. They can just help in viewing the inputs/outputs independent of Gnuastro!

$ sudo dnf install saods9 topcat
brew (macOS)

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.

Mandatory dependencies

Without these, Gnuastro cannot be built, they are necessary for input/output and low-level mathematics (see Mandatory dependencies)!

Homebrew manages packages in different ‘taps’. To install WCSLIB via Homebrew you will need to tap into brewsci/science first (the tap may change in the future, but can be found by calling brew search wcslib).

$ brew tap brewsci/science
$ brew install wcslib gsl cfitsio
Optional dependencies

If present, these libraries can be used in Gnuastro’s build for extra features, see Optional dependencies.

$ brew install ghostscript libtool libjpeg \
               libtiff libgit2 curl lzip
Programs to view FITS images or tables

These are not used in Gnuastro’s build. They can just help in viewing the inputs/outputs independent of Gnuastro!

$ brew install saoimageds9 topcat
pacman (Arch Linux)

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 GNU/Linux uses “Package manager” (Pacman) to manage its packages/components.

Mandatory dependencies

Without these, Gnuastro cannot be built, they are necessary for input/output and low-level mathematics (see Mandatory dependencies)!

$ sudo pacman -S gsl cfitsio wcslib
Optional dependencies

If present, these libraries can be used in Gnuastro’s build for extra features, see Optional dependencies.

$ sudo pacman -S ghostscript libtool libjpeg \
                 libtiff libgit2 curl lzip
Programs to view FITS images or tables

These are not used in Gnuastro’s build. They can just help in viewing the inputs/outputs independent of Gnuastro!

SAO DS9 and TOPCAT are not available in the standard Arch GNU/Linux repositories. However, installing and using both is very easy from their own web pages, as described in SAO DS9 and TOPCAT.

zypper (openSUSE and SUSE Linux Enterprise Server)

SUSE Linux Enterprise Server78 (SLES) is the commercial offering which shares code and tools. Many additional packages are offered in the Build Service79. openSUSE and SLES use zypper (cli) and YaST (GUI) for managing repositories and packages.

Configuration

When building Gnuastro, run the configure script with the following CPPFLAGS environment variable:

$ ./configure CPPFLAGS="-I/usr/include/cfitsio"
Mandatory dependencies

Without these, Gnuastro cannot be built, they are necessary for input/output and low-level mathematics (see Mandatory dependencies)!

$ sudo zypper install gsl-devel cfitsio-devel \
                      wcslib-devel
Optional dependencies

If present, these libraries can be used in Gnuastro’s build for extra features, see Optional dependencies.

$ sudo zypper install ghostscript_any libtool \
                      pkgconfig libcurl-devel \
                      libgit2-devel \
                      libjpeg62-devel \
                      libtiff-devel curl
Programs to view FITS images or tables

These are not used in Gnuastro’s build. They can just help in viewing the inputs/outputs independent of Gnuastro!

$ sudo zypper install ds9 topcat

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 step the library is not found, then configure Gnuastro like the command below (correcting /path/to/lib). For more, see Known issues and Installation directory.

$ ./configure LDFLAGS="-L/path/to/lib"

Not finding header (.h) files while building: If a library is installed, but during Gnuastro’s make step, the library’s header (file with a .h suffix) is not found, then configure Gnuastro like the command below (correcting /path/to/include). For more, see Known issues and Installation directory.

$ ./configure CPPFLAGS="-I/path/to/include"

Gnuastro’s programs do not run during check or after install: If a library is installed, but the programs do not run due to linking problems, set the LD_LIBRARY_PATH variable like below (assuming Gnuastro is installed in /path/to/installed). For more, see Known issues and Installation directory.

$ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/installed/lib"

Footnotes

(77)

https://en.wikipedia.org/wiki/List_of_Linux_distributions#Debian-based

(78)

https://www.suse.com/products/server

(79)

https://build.opensuse.org


Previous: Bootstrapping dependencies, Up: Dependencies   [Contents][Index]