Ben Chuanlong Du's Blog

It is never too late to learn.

Package Management in Linux

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

There are many different ways to install packages in Linux.

  1. Build From Source

  2. Pre-built Binary

  3. Use distribution specific tools. For example, you can use apt-get or wajig for Debian-based Linux Distributions.

  4. Homebrew and Nix are 2 popular package management tools for Linux when you do not have the root permission. Homebrew is preferred to Nix for multiple reasons.

    • Homebrew works for both macOS and Linux. For people who have already been using Homebrew on macOS, there's no learning effort at all.

    • Homebrew has more packages.

  5. Use cross‐platform and dependency‐free app formats, e.g., snap, FlatPak and AppImage . snap is more popular than flatpak and AppImage. For details of comparisons, please refer to What are the differences between snaps, appimage, flatpak and others? .

AppImage

  1. Software Center (A fancy GUI for managing packages on Ubuntu/Debian)
  2. Software Management (Linux Mint)

Debian Series of Linux Distributions

wajig apt-get, dpkg,

use alien or rpm to install rpm packages, wajig install alien; sudo alien -i *.rpm

dpkg -S $(which free)

Apt-get有问题时可以试试dpkg, apt-get worries about dependencies but dpkg not, so then dependency is broken, you can use dpkg to install/remove packages

$ aptitude why libpng12-0

apt-mark manual

RedHat

https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg

https://pkgs.org/

Comments