Skip to main content

Package management

Install Development Tools

CentOS

# List available groups
yum group list

# Install "Development Tools"
yum group install "Development Tools"

Ubuntu

apt install build-essential

MSYS2

pacman -S base-devel

Add EPEL repository to CentOS / RHEL

Ref: Extra Packages for Enterprise Linux (EPEL)

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Download package with dependence

For Debian

Ref: Stack Overflow

# -i = --important : Show only Depends and Pre-Depends
apt download $(apt-cache depends --recurse -i <package> | grep -v "^[ <]")

Install downloaded package

# -m = --fix-missing : Ignore missing packages
sudo apt-get install -m --no-download ./*.deb

or

sudo dpkg -i ./*.deb

List installed package

For Debian

apt list --installed [<package name pattern>]

or

# -l = --list
dpkg -l [<package name pattern>]