How do I install gnu gcc compiler and related tools such as autoconf, automake, flex, c++ compiler, and bison on a CentOS 7 or Red Hat Enterprise Linux version 7 server? How can I install GCC (C and C++ Compiler) and development tools on a CentOS or RHEL 7?
You can setup a basic development environment with the following packages on a CentOS Enterprise Linux or Red Hat Enterprise Linux version 7:![C++ C++](https://www.ostechnix.com/wp-content/uploads/2016/12/root@server1_002-1.png)
Animated gif 01: Installing C & C++ and related packages on a CentOS and RHEL 7 ![How to install dev c++ on linux How to install dev c++ on linux](/uploads/1/2/6/1/126104684/528509533.jpg)
Get notifications on updates for this project. Get the SourceForge newsletter. Get newsletters and notices that include site news, special offers and exclusive discounts about IT products & services. Install OpenCV on Ubuntu or Debian is a bit long but very easy. You can install OpenCV from the Ubuntu or Debian repository or from the official site. Install OpenCV from the Ubuntu or Debian repository. You can install OpenCV from the Ubuntu or Debian repository: sudo apt-get install libopencv-dev python3-opencv. However, you will probably not have installed the latest version of OpenCV and you may miss some features. Jun 09, 2018 This guide will help you install and setup C development environment in Linux (Ubuntu or other that can use package manager) using Eclipse IDE. You can deploy C program in Linux and I’ll show you the same here. Let’s part this article in these two segments for easy understanding.
- The Magick library was a set of C wrapper classes that provides access to the ImageMagick package functionality from within a C application. This is a transitional package to help migrate systems to the new ABI of libmagick-6 development files for default channel depth.
- Step to Install GNU GCC Compiler and Development tool on Ubuntu. This tutorial will help you to install development tools (C, make, GCC etc) on Ubuntu and LinuxMint systems. Quick installation tutorial for Development tools on Ubuntu and LinuxMint.
You can setup a basic development environment with the following packages on a CentOS Enterprise Linux or Red Hat Enterprise Linux version 7:
Advertisements
CentOS / RHEL 7: Install GCC Package list
![C++ C++](https://www.ostechnix.com/wp-content/uploads/2016/12/root@server1_002-1.png)
- autoconf
- automake
- binutils
- bison
- flex
- gcc (c compiler)
- gcc-c++ (c++ compiler)
- gettext
- libtool
- make
- patch
- pkgconfig
- redhat-rpm-config
- rpm-build
- rpm-sign
Installing GCC c and c++
Open the Terminal app and type the following commands.
Command to list groups on a CentOS / RHEL 7
Type the following yum command:
Sample outputs:
Another option:
Sample outputs:
# yum group list
Sample outputs:
Another option:
# yum group list ids
Sample outputs:
Command to install GCC and Development Tools on a CentOS / RHEL 7 server
Type the following yum command as root user:
OR
If above command failed, try:
Sample outputs:
# yum group install 'Development Tools'
OR
$ sudo yum group install 'Development Tools'
If above command failed, try:
# yum groupinstall 'Development Tools'
Sample outputs:
A note about failing groupinstall on CentOS/RHEL 7.x
To install all the packages belonging to a package group called “Development Tools” use the following command:
OR
The yum has changed in Red Hat Enterprise Linux 7/CentOS 7. The package group “Development Tools”” has only the optional packages which by default doesn’t get installed. So we will need to pass the option --setopt=group_package_types=mandatory,default,optional to install the optional packages too.
# yum --setopt=group_package_types=mandatory,default,optional groupinstall 'Development Tools'
OR
# yum --setopt=group_package_types=mandatory,default,optional group install 'Development Tools'
The yum has changed in Red Hat Enterprise Linux 7/CentOS 7. The package group “Development Tools”” has only the optional packages which by default doesn’t get installed. So we will need to pass the option --setopt=group_package_types=mandatory,default,optional to install the optional packages too.
Verify your gcc installation on a CentOS / RHEL 7 server
Type the following command to see gcc location:
Type the following command to see gcc compiler version:
Test gcc C compiler with a sample foo.c program
Create a file called foo.c as follows:
To compile foo.c into foo executable file, type:
To execute foo program, type:
$ cc foo.c -o foo
To execute foo program, type:
A note about install man pages on a CentOS 6/7
Install Dev C++ In Linux
![How to install dev c++ on linux How to install dev c++ on linux](/uploads/1/2/6/1/126104684/528509533.jpg)
Use the yum command as follows:
$ ## [ CentOS 7 ] ##
$ sudo yum install man-pages man-db man
$ ## [ CentOS 6.x ] ##
$ sudo yum install man man-pages
Conclusion
You learned how to install GNU c, c++ compilers and releated tools on a CentOS or Red Hat Enterprise Linux version 7.x. See GCC site for more info.
This entry is 3 of 13 in the Linux GNU/GCC Compilers Tutorial series. Keep reading the rest of the series:- CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools
ADVERTISEMENTS