Apr 02

How do I compile stuff?

Category: Linux   — Published by tengo on April 2, 2008 at 1:49 pm

Compiling an application or programm from source is actually not as complicated as it seems. In most cases and when everything is setup right, the procedure is as follows:

  1. Go to a directory where you have write permissions or become the superuser root
  2. Get the source of the application, for example from the web with wget
  3. Untar the archive: tar -xvf filename.tar.gz
  4. step down into the directory: cd filename
  5. run the configure script: ./configure
  6. then: make
  7. optionally: make test
  8. then: make install

To remove temporary files, optionally: make clean

Hint: You can concatenate commands on linux/unix like this: make && make install

According to Wikipedia, compiling is the process of "translat[ing] source code written in a computer language into another computer language", for example to create an executable binary. Now you know...