I come from Debian-based distros, and so the only thing I know is that software manager for Ubuntu is apt and Snap (correct me if I’m wrong though).
Manjaro would be my first attempt at a Linux distro not based on Debian, and I am confused about the software manager here.
What’s the difference between installing the same software using AUR, Snap or Flatpak? And which one is the recommended one?
May i recommend you a good search engine, bro ?
What’s the difference between a car, a truck and a boat ?
snaps/flatpaks/appimages are self-contained applications running in a sandbox with mediated access to the host system.
AUR is a volunteer maintained PKGBUILD(is a script how binary packages are built in pacman) repo. when you build packages from said AUR PKGBUILD you get binary packages that function just like officially supported binary packages, not app enclave like snaps
Snap and Flatpak also work on Debian, right? I’m guessing you didn’t spend too long on Debian based distros either. You’re looking at ‘complete package’ management - sandboxed ways to deliver software to many platforms.
AUR is a volunteer USER repository to install packages in Arch - as such it isn’t actually part of the community repo… and you should work to learn more about it, as it isn’t guaranteed to be safe (it’s USER based, not Arch) but it’s also a great source. The beauty of AUR is it comes with PKGBUILD and basically does most of the work for you.
You also omiited mentioning ‘Appimage’ which is also - sometimes - a ‘best’ solution.
Often it’s best to look as you install specific applications because which one is best can vary…
Snap is unpopular due to it being Canonical’s own… but with all of these options you can get software often not available in the Arch repos… but sometimes we have to choose ‘install Snap, or do without’. I can’t comment too much as I have none ATM.
Thanks for the help!
I’m still very confused about the difference in using one method instead of the other, and I admit not being very smart when it comes to Linux.
For example, what’s the difference between installing an application using AUR Vs. manually compiling it?
Also, I have heard that sometimes using AUR to install software that may break the system or some libraries or dependencies or something like that (like installing an application might break another application and so on and so forth).
So what’s the proper way of installing software using Manjaro? Is there one? Or at least is there a more recommended one?
Source: Be Careful With The AUR On Manjaro Linux - YouTube
forget this, best method for break your system (rolling is not compatible)
In many cases, it’s the same thing. PKGBUILDs from AUR simply automate the process.
Read @linux-aarhus’ guide for details.
Prefer installing packages from Manjaro’s repositories, as much as possible. Moreover, all editions ship pamac for managing packages graphically, and third-party sources are disabled by default.
AUR, Flatpak and Snap should rather be restricted for packages unavailable in the repositories, or for some specific cases.
Well, the main difference is this:
If you manually compile and install an application (i.e., without using a PKGBUILD), you bypass the package management system (pacman). So this will make it harder to later:
- uninstall the software (if and when desired) without leaving traces,
- upgrade the software to a newer version (both because nothing tracks that it is installed, so upgrades cannot be automatically offered to you, and because you may be left with leftover files from the old version, see the previous point),
- keep track of dependencies (in particular, nothing will stop you from uninstalling libraries required by the application, breaking it).
On the other hand, if you install from AUR, yes, in most cases, you will also be compiling the application from source (except if the PKGBUILD downloads an upstream binary blob instead, which is usually not very good packaging practice, but which is sometimes done for various reasons, e.g., long build times, binary-only software, etc.), but instead of installing it directly, you will be building a package (a pacman .pkg) from it and installing it with pacman. This seems contrived (and compared to a purely binary distribution or a natively source-based distribution, it kinda is), but the AUR helpers automate that process for you, and it gives you an experience close to a source-based distribution on the mainly binary Manjaro (or Arch or any other Arch derivative) distribution.
Ubuntu mostly relies on prebuilt PPAs to deliver software outside of the main repository (and most other major distributions work that way, too). In the Arch universe (of which Manjaro is part), there are few such prebuilt third-party repositories, and additional packages are instead mainly delivered through the source-only AUR. One reason for this is that Arch does not have the resources to provide a public build system on which any community contributor can build custom packages. (Ubuntu has the Launchpad PPA system, Fedora has Copr, openSUSE has OBS (Open Build Service), etc.) Another one is that the AUR approach allows shipping some non-redistributable proprietary software that cannot be shipped in a binary PPA unless contrived hacks such as GitHub - leamas/lpf: lpf - Local Package Factory are used (which end up doing essentially the same thing the AUR helper does, anyway: the dummy binary package just builds another package and installs it). Such software is obviously not really built from source code, but building the package “from source” (i.e., from a PKGBUILD) allows downloading the unmodified binary blob directly from upstream (before or as part of the package build), avoiding the redistribution issue.
Thanks @maycne.sonahoz and @Kevin_Kofler for the explanations!
So the best way to install new software on Manjaro is to always use pamac?
It’s one way, albeit recommended.
Many use something else and still gracefully manage.