The latest official release tarball is always available as gnuastro-latest.tar.gz. For better compression (faster download), and robust archival features, an Lzip compressed tarball is also available at gnuastro-latest.tar.lz, see Release tarball for more details on the tarball release1.
Let’s assume the downloaded tarball is in the TOPGNUASTRO directory.
The first two commands below can be used to decompress the source.
If you download tar.lz and your Tar implementation doesn’t recognize Lzip (the second command fails), run the third and fourth lines2.
Note that lines starting with
## don’t need to be typed.
## Go into the download directory. $ cd TOPGNUASTRO ## Also works on `tar.gz'. GNU Tar recognizes both formats. $ tar xf gnuastro-latest.tar.lz ## Only when the previous command fails. $ lzip -d gnuastro-latest.tar.lz $ tar xf gnuastro-latest.tar
Gnuastro has three mandatory dependencies and some optional dependencies for extra functionality, see Dependencies for the full list. In Dependencies from package managers we have prepared the command to easily install Gnuastro’s dependencies using the package manager of some operating systems. When the mandatory dependencies are ready, you can configure, compile, check and install Gnuastro on your system with the following commands. See Known issues if you confront any complications.
$ cd gnuastro-X.X # Replace X.X with version number. $ ./configure $ make -j8 # Replace 8 with no. CPU threads. $ make check -j8 # Replace 8 with no. CPU threads. $ sudo make install $ echo "source /usr/local/share/gnuastro/completion.bash" >> ~/.bashrc
The last command is to enable Gnuastro’s custom TAB completion in Bash. For more on this useful feature, see Shell TAB completion (highly customized)).
For each program there is an ‘Invoke ProgramName’ sub-section in this book which explains how the programs should be run on the command-line (for example Invoking Table).
Some complete Tutorials are also available in this book with common Gnuastro usage scenarios in astronomical research. They even contain links to download the necessary data, and thoroughly describe every step of the process (the science, statistics and optimal usage of the command-line). We therefore strongly recommend to follow the tutorials before starting to use Gnuastro, see Tutorials.
The Gzip library and program are commonly available on most systems.
However, Gnuastro recommends Lzip as described above and the beta-releases are also only distributed in tar.lz.
You can download and install Lzip’s source (in .tar.gz format) from its web page and follow the same process as below: Lzip has no dependencies, so simply decompress, then run
sudo make install.
In case Tar doesn’t directly uncompress your .tar.lz tarball, you can merge the separate calls to Lzip and Tar (shown in the main body of text) into one command by directly piping the output of Lzip into Tar with a command like this:
$ lzip -cd gnuastro-0.5.tar.lz | tar -xf -