Installing from source with packmahn

Normally you install and maintain packages by using the package repositories of your distribution, but sometimes you have to install and update software from source.

Typically the source of packages is provided as a tar.gz file. tar is a Linux equivalent of zip. The gz extension indicates that the gzip algorithm has been used for compression.

Unpack the compressed tar:

tar -xvzf package.tar.gz

Flags:

  • x for extract
  • v for verbose (tells you which files are extracted)
  • z to filter the archive through gzip
    • This seems optional though!
  • f for the file name

Navigate with cd to the created folder.

Run makepkg.

This should create a package file, like *.pkg.tar.xz.

Then install using pacman -U package*.tar.gz.