GNU编译器集合(GCC)是一系列用于多种编程语言开发的编译器和库的集合,其中包括C、C++、Objective-C、Fortran、Ada、Go和D等编程语言。众多开源项目,包括Linux内核和GNU工具,通常使用GCC进行编译。
CentOS软件源默认包含名为“Development Tools”的软件包组,其中包含了GNU编译器集合、GNU调试器以及其他编译软件所必需的开发库和工具。
Centos7
yum -y groupinstall "Development Tools"
Centos8/Almalinux/Rocklinux
查看可安装的套件
[root@rocky ~]# dnf group list
Server with GUI
Minimal Install
Workstation
KDE Plasma Workspaces
Virtualization Host
Custom Operating System
Installed Environment Groups:
Server
Installed Groups:
Container Management
Development Tools
Headless Management
Available Groups:
.NET Core Development
RPM Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Network Servers
Scientific Support
Security Tools
Smart Card Support
System Tools
Fedora Packager
Xfce
查看“Development Tools”包含那些软件
[root@rocky ~]# dnf groupinfo "Development Tools"
Group: Development Tools
Description: A basic development environment.
Mandatory Packages:
autoconf
automake
binutils
bison
flex
gcc
gcc-c++
gdb
glibc-devel
libtool
make
pkgconf
pkgconf-m4
pkgconf-pkg-config
redhat-rpm-config
rpm-build
rpm-sign
strace
Default Packages:
asciidoc
byacc
ctags
diffstat
elfutils-libelf-devel
git
intltool
jna
ltrace
patchutils
perl-Fedora-VSP
perl-Sys-Syslog
perl-generators
pesign
source-highlight
systemtap
valgrind
valgrind-devel
Optional Packages:
cmake
expect
rpmdevtools
rpmlint
安装"Development Tools"开发套件
dnf group install "Development Tools"
Debian
apt-get install build-essential
Alpinelinux
apk add alpine-sdk
Archlinux
pacman -S base-devel
FreeBSD
pkg install pkg git
FreeBSD其它编译器安装
pkg install clang
pkg install gcc