Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-02-2003, 04:23 PM   #1
LQ Newbie
Registered: Nov 2003
Posts: 6

Rep: Reputation: 0
Biggest newbie question of them all...

How do I compile?

I keep downliding files, that need to be compiled in order to run, but I don't know how to do that. I run ML 9.1 under KDE (and sometimes GNOME) and if I double click it gives me an error, or if I try to run it under the console I can't seem to do it.

I heard of GNU Make and d/l'ed it, but ti seems to be needing a compile as well...

Someone throw me into Linux 101...
Old 11-02-2003, 04:33 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Take a look at jeremy's linux answer:
Old 11-02-2003, 04:34 PM   #3
LQ Newbie
Registered: Nov 2003
Posts: 6

Rep: Reputation: 0
I found this a little while ago it helped me.

7.2 Installing from source

So-called 'tarballs' are packages with the ending tar.gz, .tgz, .bz2 or .gz. These mostly contain programs in source-code that you have to compile yourself. They contain files like README, INSTALL etc. Read them and follow the instructions.
The basic commands needed to compile most programs are. /configure, make, make install. It all depends on the programmer that wrote them if they compile straight away or if you have to fiddle with path-or makefile settings or have to install other programs first (Check the Software Building HOWTO for that).

If you don't want to do that, check the rpm-repository at first, if they have an rpm of that program you won't need to do it yourself. It may be a good idea to keep large downloaded packages somewhere in case you need them again (I use cdrs as they are so cheap).

Why someone wants to compile from source anyway if it can be such a tedious task?, you may ask. Some reasons are: you may customize program features and install paths self compiled programs usually are even more stable and faster than precompiled ones because they are more suited to your system settings, upgrading is easier: you just simply apply a patch and recompile. With rpms you have to download the whole program again. Source code is more up-to-date. Programs are written in source code. To make a rpm of them, you first have to compile them, write the installation scripts and (hopefully) test them. So if this program has a flaw or is missing a feature you want badly you can do nothing but issue a bug-report or a feature request and hope for the next version. If you have the source chances are the author will write a fix/patch, which you can apply soon.

The following is a quick walkthrough to compile a program
Compiling software from source:

We will be using the Ed editor as an example the latest download can be found at

Download the source files to your hard drive.
Change to the directory that you downloaded to.
The file is called ed-0.2.tar.gz this is the latest as of this writing.
Extract the file using ark right click the file and choose archiving tool.
In the new window that opens choose Action | extract.
Choose the location to extract to and make sure the all button is checked press ok.
In a few seconds this will be completed.
As an alternative you can open a console and type 'gunzip ed-0.2.tar.gz' and then type 'tar xvf ed-0.2.tar'.
The switches for tar mean x=extract v=verbose this lets you see what it is doing and f=file.
Open the file manager and navigate to the location containing the source files.
Press Ctrl + t this will open a console in the current directory.
For the remainder of this I will assume you are working as root.
In the console type './configure' when completed check for any errors.
If there are no errors you will want to type 'make'.
Again check that there are no errors and then type 'make install'.
I highly recomend reading the man page for ed before running it while ed is easy to compile it is not easy to run.
There you have it 90% of all files are compiled this way
make install

There's more info at the site if it would help you. It explains how to install packages that you need installed to compile the code at this link:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
which one is the biggest risk? shanenin Slackware 16 03-24-2006 09:50 PM
The biggest question i have to ask about linux mdkusr General 36 10-18-2005 11:19 PM
Biggest n00b question...ever total_eclipse03 Linux - Newbie 3 05-14-2004 10:25 PM
Red Hat 9 biggest newbie questions ever Fusioncases Linux - Newbie 13 09-28-2003 07:59 AM
The Biggest Newbie Of All And Needs Help Like Loooooaaaads Randvegeta Linux - Newbie 2 06-08-2003 12:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration