I am researching how to install Ruby 1.9.1 in Xubuntu 10.04 and I came across the command build-essential and build-dep multiple times. Sometimes it is followed by packages and sometimes it is both preceded and post-ceded by packages.
The 2 examples I am looking at are:
sudo apt-get install build-essential
zlib1g zlib1g-dev zlibc libruby1.9
libxml2 libxml2-dev libxslt-dev
sudo apt-get build-dep ruby1.9
sudo apt-get install ruby irb ri rdoc
ruby1.8-dev libzlib-ruby libyaml-ruby
libcurses-ruby libruby libruby-extras
sqlite3 libsqlite3-dev libsqlite3-ruby
build-essential package is a reference for all the packages needed to compile a Debian package. It generally includes the GCC/g++ compilers and libraries and some other utilities.
sudo apt-get build-dep packagename means “As root, install all dependencies for ‘packagename’ so that I can build it”. So build-dep is an apt-get command just like install, remove, update, etc.
build-essential is a package which contains references to numerous packages needed for building software in general.
build-essential has one magical property: it does not need to be listed as a build dependency under the
Build-Depends control field (
debian-packages) of source packages as documented at https://www.debian.org/doc/debian-policy/ch-source.html#s-pkg-relations
You can get a list of the build-essential packages at:
You can also determine if a package is part of
apt-cache show gcc
“build-essential” contains tools (like the gcc compiler, make tool, etc) for compiling/building software from source. So you start with (usually C) source files and create executables from them.
If you are just trying to get Ruby installed, I would highly recommend just using RVM (Ruby Version Manager):
Follow the instructions under “Github Repository (recommended)”
Note that you will need the Git version control software installed first. Use
apt-get install git-core if you don’t have that yet.