GCC is an Acronym for “GNU Compiler Collection”. It is a collection of compilers for C, C++, Fortran and other tools.
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | No |
Requirements | None |
Time | N/A |
You can query your package database for installed compiler set under Linux operating systems.
Command for Debian / Ubuntu Linux users
Type the following dpkg command to see installed compilers and version:
$ dpkg --list | grep compiler
Sample outputs:
ii g++ 4:4.4.5-1 The GNU C++ compiler ii g++-4.4 4.4.5-8 The GNU C++ compiler ii gcc 4:4.4.5-1 The GNU C compiler ii gcc-4.3 4.3.5-4 The GNU C compiler ii gcc-4.4 4.4.5-8 The GNU C compiler
To list all available compilers that can be installed, enter apt-cache command:
$ apt-cache search Compiler
$ apt-cache search Compiler | grep -i --color java
$ apt-cache search Compiler | grep -i --color fortran
Sample outputs:
libsidl-1.4.0 - Scientific Interface Definition Language (SIDL) C(++)/FORTRAN runtime libsidl-dev - Scientific Interface Definition Language (SIDL) C(++)/FORTRAN runtime devel libetsf-io-dev - Static libraries and Fortran module files of ETSF_IO f2c - A FORTRAN 77 to C/C++ translator ftnchek - A semantic checker for Fortran 77 programs fweb - A literate-programming tool for C/C++/Fortran/Ratfor gfortran-4.3-multilib - The GNU Fortran 95 compiler (multilib files) gfortran-4.3 - The GNU Fortran 95 compiler gfortran-4.4-multilib - The GNU Fortran 95 compiler (multilib files) gfortran-4.4 - The GNU Fortran 95 compiler gfortran-multilib - The GNU Fortran 95 compiler (multilib files) gfortran - The GNU Fortran 95 compiler gfortran-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.1-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.2-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.3-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.4-doc - documentation for the GNU Fortran Compiler (gfortran)
Use the apt-get command to install compiler under Debian / Ubuntu Linux:
$ sudo apt-get install gfortran
Command for Red Hat / RHEL / CentOS / Fedora Linux users
Type the following yum command to list all installed compiler:
$ yum list installed | grep -i --color compiler
$ yum list installed | grep -i --color gcc
$ yum list installed | grep -i --color java
$ yum list installed gcc
$ yum list installed 'gcc*'
Sample outputs:
Loaded plugins: auto-update-debuginfo, product-id, protectbase, rhnplugin, subscription-manager Updating certificate-based repositories. 0 packages excluded due to repository protections Installed Packages gcc.x86_64 4.4.6-4.el6 @rhel-x86_64-server-6
To search all available compiler, run:
$ yum search all compiler
However, I recommend the following command to list all development tools under RHEL and friends:
$ yum groupinfo "Development tools"
Sample outputs:
Loaded plugins: auto-update-debuginfo, product-id, protectbase, rhnplugin, subscription-manager Updating certificate-based repositories. Setting up Group Process Group: Development tools Description: A basic development environment. Mandatory Packages: autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch pkgconfig redhat-rpm-config rpm-build Default Packages: byacc cscope ctags cvs diffstat doxygen elfutils gcc-gfortran git indent intltool patchutils rcs subversion swig systemtap Optional Packages: ElectricFence ant babel bzr ccache chrpath clips clips-devel clips-doc clips-emacs clips-xclips clipsmm-devel clipsmm-doc cmake cmucl colordiff compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 cvsps darcs dejagnu email2trac expect ftnchek gcc-gnat gcc-java gcc-objc gcc-objc++ ghc git haskell-platform imake jpackage-utils kdewebdev libstdc++-docs lua mercurial mock mod_dav_svn nasm nqc nqc-doc ocaml perltidy python-docs qgit rpmdevtools rpmlint sbcl systemtap-sdt-devel systemtap-server trac trac-git-plugin trac-mercurial-plugin trac-webadmin translate-toolkit
Use the yum command to install compiler under RHEL / CentOS:
# yum install gcc
OR for the latest version of a CentOS/RHEL 7 try the following command to install compiler collection:
# yum group install "Development Tools"
- Ubuntu Linux Install GNU GCC Compiler and Development Environment
- Debian Linux Install GNU GCC Compiler and Development Environment
- CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools
- Download and Install C, C++ Compiler on Red Hat Enterprise Linux 5 (RHEL)
- Mac OS X: Install GCC Compiler with Xcode
- Where is My Linux GNU C or GCC Compilers Are Installed?
- HowTo: Compile And Run a C/C++ Code In Linux
- RHEL / CentOS Linux Install Core Development Tools Automake, Gcc (C/C++), Perl, Python & Debuggers
- HowTo Compiling C Program And Creating Executable File Under a Linux / UNIX / *BSD
- How To Install ncurses Library on a Linux
- Linux Find Out What Compilers Are Installed or Available On The System
- Linux Find Out GNU gcc Compiler Version Used To Compile Running Kernel
- Howto see output of C program in Linux or UNIX
🐧 2 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
when ever i try to install X-crysden i found one massage:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
please suggest me how to install xcrysden in ubuntu
without subscription i can’t able to use c compilers or what ??