In general it is recommend to use the packages coming by your distribution and using the related package manager (e.g.
dpkg/apt-get on Debian-based system). The task of your distribution is to package software and to configure it such that there are no conflicts.
Sometimes your distribution does not have the software you want or you have other reasons like e.g.
- you need a newer version
- you want to have a special configuration or want to include patches etc.
- you need more performance and therefore want to optimize the software especially for your hardware (processor, ...)
because you want to compile the software yourself (which can be become quite difficult - especially if you do not know all dependencies).
You have then different options:
- rebuild it from the source, usually from a tarball (=
*.tar.gz file) or from an upstream source repository like github
- download/install a corresponding pre-built package (directly or by using an unofficial repository)
- use the existing package source from your distribution, update it by hand and create a new package which you then can install.
If you install software not using the package manager, it is strongly recommended to install the software to other places than the package manager use. The destined prefix is
/usr/local/. Installing into a new subdirectory of
/opt or somewhere in your home folder are also options.