How do I install all developer tools such as GNU GCC C/C++ compilers, make and others, after installing CentOS or RHEL or Fedora Linux from a shell prompt?
You need to install 'Development Tools' group. These tools include core development tools such as automake, gcc, perl, python, and debuggers which is required to compile software and build new rpms:
=> flex
=> gcc
=> redhat-rpm-config
=> strace
=> rpm-build
=> make
=> pkgconfig
=> gettext
=> automake
=> strace64
=> gdb
=> bison
=> libtool
=> autoconf
=> gcc-c++
=> binutils and all dependencies.
Open termianl or login over ssh session and type the following command as root user:
# yum groupinstall 'Development Tools'
Sample output:
Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile * base: mirror.steadfast.net * updates: dist1.800hosting.com * addons: centos.mirrors.tds.net * extras: dist1.800hosting.com Setting up Group Process Loading mirror speeds from cached hostfile * base: mirror.steadfast.net * updates: dist1.800hosting.com * addons: centos.mirrors.tds.net * extras: dist1.800hosting.com Package make - 1:3.81-3.el5.i386 already installed and latest version Package gettext - 0.14.6-4.el5.i386 already installed and latest version Package binutils - 2.17.50.0.6-6.el5.i386 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package automake.noarch 0:1.9.6-2.1 set to be updated ---> Package frysk.i686 0:0.0.1.2008.03.19.rh1-1.el5 set to be updated --> Processing Dependency: libgcj.so.7rh for package: frysk --> Processing Dependency: glib-java >= 0.2.6 for package: frysk ---> Package autoconf.noarch 0:2.59-12 set to be updated --> Processing Dependency: imake for package: autoconf ---> Package rcs.i386 0:5.7-30.1 set to be updated ---> Package strace.i386 0:4.5.16-1.el5.1 set to be updated ---> Package redhat-rpm-config.noarch 0:8.0.45-24.el5 set to be updated ---> Package elfutils.i386 0:0.125-3.el5 set to be updated --> Processing Dependency: libdw.so.1 for package: elfutils ........... .... .. Transaction Summary ============================================================================= Install 105 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 127 M Is this ok [y/N]: y Downloading Packages: (1/105): python-numeric-2 100% |=========================| 751 kB 00:12 (2/105): xorg-x11-fonts-b 100% |=========================| 3.7 MB 01:03 (3/105): pfmon-3.2-0.0609 100% |=========================| 656 kB 00:10 (4/105): automake14-1.4p6 100% |=========================| 205 kB 00:03 (5/105): libtool-1.5.22-6 100% |=========================| 680 kB 00:11 (6/105): systemtap-0.6.2- 100% |=========================| 1.3 MB 00:22
Now you can compile and use any application on your system.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











{ 21 comments… read them below or add one }
Thank you for your suggestions !..it work perfectly for me. I really appreciate it !
Best regards,
Alfredo
How can I find wich packages I am installing in group install? I want to now wich packages I am installing before entering “group install ….” command.
CentOS 5 and CentOS 6
This is so nice… but my target machine is not connected to the internet. What would I have to copy over it in order for yum groupinstall ‘Development Tools’ to work?
I expect I need at least to download the .rpm for all the packages listed in the group. So the double question:
- where to download them from?
- where to copy them to?
Use DVD via yum command, just open /etc/yum.repos.d/CentOS-Media.repo and make sure enabled=1. To use this repo, put in your DVD and use it with the other repos too:
yum --enablerepo=c5-media groupinstall Development Tools'Thank You!!
Your’s Document is very nice! My Problem.
Hi Andy Park:
I am new to CentOS Linux as well, please help me!!
I am trying to install a router to the CentOS but it requires me to install C compiler first, I have tried to input the command of “yum groupinstall ‘Development Tools’. However, I am receiving the following error message:
“Error: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Errno 4] IOError:
Error: Cannot find a valid baseur1 for repo: base
What does that mean? Can you or anyone please help me to install the C compiler?
Any common are appreciated!!
It’s telling you that it can’t access the mirror you’ve chosen, more than likely, the network isn’t up and running, or it’s not connectable. The easiest solution is to download the DVD(s) and install from them…
[code]
yum --enablerepo=c5-media groupinstall Development Tools'
[/code]
works perfectly. thanks a great deal
Looks good, but what if I’m not able to connect directly to a network anymore? How could I down load the appropriate RPMs and do this install off line?
hi,Guy.
My OS is CentOS 5 and I have type : yum groupinstall ‘Development Tools’,But at the end of it return some errors like:
-----------------------------------cut-off line---------------Transaction Check Error:
file /usr/share/man/man1/Xserver.1x.gz from install of xorg-x11-server-Xvfb-1.1.1-48.67.el5 conflicts with file from package xorg-x11-server-Xnest-1.1.1-48.26.el5
file /usr/share/man/man1/Xserver.1x.gz from install of xorg-x11-server-Xvfb-1.1.1-48.67.el5 conflicts with file from package xorg-x11-server-Xorg-1.1.1-48.26.el5
Error Summary
-----------------------------------cut-off line---------------
Can you help me,plz?
you should do an update before hand with the command ” yum update “
Run
yum clear allHello everyone,
I really need help with this i’ve treid EVERYTHING doe the last two days at least 5-6 hours / day.
I’m trying to install a newtwork driver r8168 because the one that came with the installation r8169 is messing up bad and i cannot access internet.
I’ve tried yum –enablerepo=c5-media groupinstall Development Tools’
but I am getting the same errror as Hades :
“Error: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Errno 4] IOError:
Error: Cannot find a valid baseur1 for repo: base
I need to get gcc installed.
Ive tried downloading it in tar.bz2 and tried installing it that way but still no luck. All the packages that i have found when i run them they try to go out on the internet to get necessary files.
I’ve never been more frustrated in my life please help :(
yum — disablerepo=\* –enablerepo=c5-media groupinstall ‘Development Tools’
to disable checking on-line and only use cdrom.
you need to have your cdrom mounted in the correct directory check with /etc/yum.repos.d/CentOS-Media.repo
Jim
Hi, I successfully installed Developement Tool but when I am trying to install Ogg codec I get an error which says
root@vid [~]# cd /usr/src
root@vid [/usr/src]# svn checkout http://svn.xiph.org/trunk/ogg/ ogg
Checked out revision 17790.
root@vid [/usr/src]# cd ogg
root@vid [/usr/src/ogg]# ./autogen.sh
checking for autoconf…
checking for automake 1.11 or later… no
checking for aclocal 1.11 or later… no
You must have automake installed to compile libogg.
Download the appropriate package for your distribution,
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/
root@vid [/usr/src/ogg]#
and when I try to install automake it says.
Package automake16-1.6.3-8.el5.1.noarch already installed and latest version
Package automake17-1.7.9-7.el5.2.noarch already installed and latest version
Package automake14-1.4p6-13.el5.1.noarch already installed and latest version
Package automake15-1.5-16.el5.2.noarch already installed and latest version
I am not what going on but your help will be appreciated. I am working on it for long hrs.
Thanks a lot
I am running CentOS 5.6 on an enterprise server and on a lab pc for testing various SIP enable open source systems, such as Asterisk.
You must have selected the gcc options from the install, there is a button to select install packages now, be sure to select all the components that start with gcc, you will need to look in the developer tools section. If you already have gcc then a lot time will be saved, if not then you will have a lot do, the initial install for Linux is very critical.
1) Download gcc from http://www.gnu.org then select one of the mirror sites. You could see a lot of individual down loads, however the gcc-4.6.0 is the largest download and has everything, and I do mean everything. Start to completion if ti goes right will take around 2 hours or so depending on the server class.
2) Untar the download, ex. tar -jxvf filename.gz.bz2, -j is needed to untar the bz2 type tar ball, -zxvf will be used for the other files.
3) Once untarred there are several instruction files, one in particular will get you going, prerequesites.html as well as other docs.
4) Pay close attention to the files/libraries needed, gmp, mpc, and mpfr are needed for the gcc to complete. The incredibly nice thing is that the gnu gcc developers made it easy. Look at the alternative install statement you can untarr the gmp, mpc, and mpfr. Then put them into a directory named gmp, mpc, and mpfr in the gcc-4.6.0 directory that was created when you untarred the gcc compiler/s, there is more than one is the gcc complete.
5) A quick look at gcc-4.6.0 directory and verify the untarred files are in their respective directories. Note: untarring the gmp, mpc, and mpfr will put them in their own directory, just use the mv command if necessary to get them into those gmp, mpc. and mpfr directories under the gcc-4.6.0 directory. The reason for this is that the doc states that the gcc gnu team has the install worked out for you if the gmp, mpc, and mpfr directories are there. If you have done all this then just run the ./configure from the gcc-4.6.0 directory, when that completes, then type make, after that you will have around 2 hours to kill for that to complete.
Good luck, I hope this helps
Hi guys,
I know this thread is kinda of old but I was hoping someone could help me out.
So I am trying to install the CentOS development tools from the DVD because I do not have internet on this machine. Following previous suggestions I edited my etc/yum.repos.d/CentOS.Media.repo file and changed “enabled=0″ to “enabled=1″ and mounted my dvd to /media/CentOS by running the following command:
mkdir /media/CentOS
mount /dev/hdd /media/CentOS
Then I ran the following command to install the development tools from DVD:
yum –disablerepo=\* –enablerepo=c5-media groupinstall ‘Development Tools’
but I got this message:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Cannot find a valid baseurl for repo: base
*************************************************
I tried editing my Centos.mdeia.repo file again and changed “gpgcheck=1″ to “gpgcheck=0″ but that didn’t help either.
Here is a copy of my CentOS-Media.repo without the comments at the beginning:
[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=1
gpgkey= HYPERLINK “/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5″file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Any suggestions as to what I should do next?
Thanks
Hello,
I have the same problem, I follow the recommandations but I still get the same error message.
Have you find a solution ?
Thanks
Thanks, exactly what I was looking for. Good guide.
Perfect! Thanks!
Thank you so much, You’ve made my day