When I run the command:

sudo apt-get install build-essential

I get the following error message:

Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package build-essential
  • 2
    What distro (Ubuntu? Debian?) and version? What repo?
    – Dirk Eddelbuettel
    Jul 10, 2011 at 22:10
  • 2
    Are you running a Red Hat kernel on a Debian or Ubuntu distribution? Or are you actually running a Red Hat distribution? If you're running a Red Hat distribution, then you should be using yum or up2date (whichever is appropriate for your distribution version).
    – sarnold
    Jul 10, 2011 at 22:18
  • 1
    Thanks for all your help guys! Googling how to install build-essential for CentOS pointed me in the right direction.
    – Waley Chen
    Jul 10, 2011 at 22:52
  • 1
    Here's the cmd: sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel
    – Waley Chen
    Jul 10, 2011 at 22:54
  • 1
    don't forget to add that as an answer and accept it once the stack software lets you do that. :)
    – sarnold
    Jul 10, 2011 at 23:59

6 Answers 6


I believe this still should work.

sudo yum groupinstall 'Development Tools'
  • 8
    this will install every single development tools available, just FYI Jul 1, 2014 at 8:19
  • 5
    See yum group info "Development Tools" for list of packages installed
    – user12345
    Apr 11, 2016 at 22:49
  • 2
    It's a long way short of all development tools, in case you're worried. It's mostly the basics for c/c++ with automake, autoconf etc. Feb 6, 2017 at 17:46
  • 1
    But if you only need a configure/make/make install to work it may still be too much (e.g. it includes git and subversion). It's better to start with Ketan Patel's yum install and if something is still missing go for this one
    – ndemou
    Feb 12, 2017 at 19:47
  • it depends on the "programming language" needed, but if you expect to compile c++, you'll need in PLUS glibc-devel and maybe make... yum groups are soooo shitty !
    – Sandburg
    May 2, 2019 at 13:28
yum install gcc gcc-c++ make 

This works equivalent of build-essential in CentOS.

  • 5
    openssl-devel might coincidentally pull in the stuff you want, but isn't properly build-essential itself.
    – tripleee
    Jun 17, 2017 at 17:26
  • @tripleee Indeed. Good catch, make and cmake will definitely will need this. By the way I would like to add that some times I also need to install separately : glibc-devel.i686 libstdc++-devel.i686 openssl-devel.i686 , in order to have a 64bit build. Jul 10, 2020 at 8:57

The metapackage build-essential is provided on Debian to collect all the commonly required essential build tools in the Debian build chain, including those you need to create .deb packages. Centos uses a different package manager altogether and does not directly provide anything like this; you'll need to manually install the individual components of the toolchain (gcc, make, common development libraries, documentation, etc, as well as of course the tools to create RPM packages if you want to do that).

If you drop the .deb or RPM stuff, gcc, gcc-c++, glibc-devel, and make should get the corresponding Centos packages currently.


I combined accepted solution from Scott Likens with the comment from user12345, and first looked at what was in the "Development Tools" group before installing.

As user12345 pointed out, you can do this with:

$ yum group info "Development Tools"

I did want to install packages like autoconf and automake and binutils, but I did not need doxygen or ant or mercurial.

Below is the list I used, along with their dependencies, but of course, your mileage may vary, depending upon YOUR needs.

$ yum install \
    autoconf automake binutils \
    bison flex gcc gcc-c++ gettext \
    libtool make patch pkgconfig \
    redhat-rpm-config rpm-build rpm-sign \
    ctags elfutils indent patchutils 

This website has a mapping of what you should install for what unix flavor you have:


sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel
  • This seems more of a side-effect as @pablo-castellazzi mentioned in comments in your question section. Better answer imo is by K.K. Patel or Scott Likens
    – user12345
    Apr 11, 2016 at 22:44
  • 2
    The command you post asks to install xml and xslt development libraries. As a side effect it will install gcc which is an essential building tool.
    – ndemou
    Feb 12, 2017 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .