 | Distinguished Member with 2,051 posts. | | Join Date: Nov 2002 Location: Alberta, Canada Experience: Windows: Decent. Unix/Linux: Advanced +1 | | The Techguy Linux Software from source HOWTO Techguy Linux-HOWTO: Compile a program from source
($ means as a regular user
# means as root)
The first time one needs to build a program from source, the idea to a new linux user is daunting. But once one has the basics, the procedure becomes quite simple and reptitive.
Almost all program building involves the program 'make'. Make is a special program, which reads input files and performs actions based upon those input files. These files are called Makefiles. One does not, however, need to know how to read nor write these files to build software.
The first thing one does is unpack the archive the source came in.
(Select one based on the extention)
tar xvfz program.tar.gz
tar xvfj program.tar.bz2
Under normal circumstances this will create a folder called program in the current directory. CD into it.
When one builds a program, the simplest of actions is the following:
$ make
Make will then perform the needed action to build the program. After this, you will have your binary in the folder.
Some programs reqire special placing on the drive, and thus need a second command (usually performed as root). Code: $ make
# make install
This makes the program, and as root, installs it. Boom, program installed.
More complex programs however, need to know about your system, what is installed, if it's dependencies are satisfied etc.
A third step is now introduced. Code: $ ./configure
$ make
# make install
The './configure' tells your shell to execute the script in the current directory called configure. Output will go by, as configure searches for the needed programs and libraries, and outputs the specialized makefiles.
Program installed!
(This howto is very basic. I don't cover more advanced topics like alternate make targets, configure options, automake/gen however it should be good for basics.) | | Distinguished Member with 2,853 posts. | | Join Date: Jun 2003 Location: Dark Side of The Moon.. Experience: I find computers attractive. | | | | | Member with 51 posts. | | Join Date: Sep 2004 Experience: much to learn | | lmao I searched for quite a while to find such a wonderfully simple guide to installing from source.
many thanks
chz
ben | | Member with 51 posts. | | Join Date: Sep 2004 Experience: much to learn | | and cheers to Cheese for making it stick
*BUMP* | | Distinguished Member with 3,364 posts. | | Join Date: May 2003 Location: West Texas Experience: n00b | | Straight forward, plain English - Everything should be so easy! | | Distinguished Member with 25,222 posts. | | Join Date: Jun 2002 Location: Venice, FL Experience: Intermediate | | Quote: |
Originally Posted by Whiteskin Techguy Linux-HOWTO: Compile a program from source
($ means as a regular user
# means as root)
The first time one needs to build a program from source, the idea to a new linux user is daunting. But once one has the basics, the procedure becomes quite simple and reptitive.
Almost all program building involves the program 'make'. Make is a special program, which reads input files and performs actions based upon those input files. These files are called Makefiles. One does not, however, need to know how to read nor write these files to build software.
The first thing one does is unpack the archive the source came in.
(Select one based on the extention)
tar xvfz program.tar.gz
tar xvfj program.tar.bz2
Under normal circumstances this will create a folder called program in the current directory. CD into it.
When one builds a program, the simplest of actions is the following:
$ make
Make will then perform the needed action to build the program. After this, you will have your binary in the folder.
Some programs reqire special placing on the drive, and thus need a second command (usually performed as root). Code: $ make
# make install
This makes the program, and as root, installs it. Boom, program installed.
More complex programs however, need to know about your system, what is installed, if it's dependencies are satisfied etc.
A third step is now introduced. Code: $ ./configure
$ make
# make install
The './configure' tells your shell to execute the script in the current directory called configure. Output will go by, as configure searches for the needed programs and libraries, and outputs the specialized makefiles.
Program installed!
(This howto is very basic. I don't cover more advanced topics like alternate make targets, configure options, automake/gen however it should be good for basics.) | Hi Whiteskin,
I'm ready to install Ubuntu. Are there any further instructions, aside from this very good post?
__________________ "It is important that students bring a certain ragamuffin, barefoot irreverence to their studies; they are not to worship what is known, but to question it." Jacob Chanowski | | Distinguished Member with 25,222 posts. | | Join Date: Jun 2002 Location: Venice, FL Experience: Intermediate | | Quote: |
Originally Posted by Whiteskin Techguy Linux-HOWTO: Compile a program from source
($ means as a regular user
# means as root)
The first time one needs to build a program from source, the idea to a new linux user is daunting. But once one has the basics, the procedure becomes quite simple and reptitive.
Almost all program building involves the program 'make'. Make is a special program, which reads input files and performs actions based upon those input files. These files are called Makefiles. One does not, however, need to know how to read nor write these files to build software.
The first thing one does is unpack the archive the source came in.
(Select one based on the extention)
tar xvfz program.tar.gz
tar xvfj program.tar.bz2
Under normal circumstances this will create a folder called program in the current directory. CD into it.
When one builds a program, the simplest of actions is the following:
$ make
Make will then perform the needed action to build the program. After this, you will have your binary in the folder.
Some programs reqire special placing on the drive, and thus need a second command (usually performed as root). Code: $ make
# make install
This makes the program, and as root, installs it. Boom, program installed.
More complex programs however, need to know about your system, what is installed, if it's dependencies are satisfied etc.
A third step is now introduced. Code: $ ./configure
$ make
# make install
The './configure' tells your shell to execute the script in the current directory called configure. Output will go by, as configure searches for the needed programs and libraries, and outputs the specialized makefiles.
Program installed!
(This howto is very basic. I don't cover more advanced topics like alternate make targets, configure options, automake/gen however it should be good for basics.) | Better yet will I be able to install Ubuntu with the information here?
__________________ "It is important that students bring a certain ragamuffin, barefoot irreverence to their studies; they are not to worship what is known, but to question it." Jacob Chanowski | | Distinguished Member with 6,937 posts. | | Join Date: Nov 2003 Location: Kansas Experience: Advanced | | No. That information is for installing programs. Ubuntu, like most distros, comes with it's own installer(which uses dos-style graphics). | | Distinguished Member with 6,458 posts. | | Join Date: Jul 2004 Location: Louisiana Experience: 1+3+3=7 | | Ubuntu is easy enough to install. | | Account Disabled with 353 posts. | | Join Date: Nov 2005 Experience: Beginner |
30-Nov-2005, 02:55 AM
#10 | how about red hat 9.0? having fun with finding iso9660 cd images despite downloads of
everything in sight. | | Distinguished Member with 6,458 posts. | | Join Date: Jul 2004 Location: Louisiana Experience: 1+3+3=7 |
30-Nov-2005, 06:43 AM
#11 | ^Old IMO. Quite old, i'd use fedora if you want redhat, unless you pay. | | Senior Member with 162 posts. | | Join Date: May 2004 Location: Interior Alaska Experience: Advanced |
30-Nov-2005, 12:50 PM
#12 | Or WhiteBox for the RHEL4 | | Senior Member with 636 posts. | | Join Date: Apr 2006 Experience: Advanced |
22-Apr-2006, 03:05 AM
#13 | well one important thing was left out
always always right after untaring the archive read the README file
"$less README "
this is even more important if there is a configure script to run because alot of functionality depends on configuration options and you could miss out on what your installing the program for in the first place
another good idea is to keep the Makefile around just in case you want to uninstall the program a good place to do this is to make a directory named after the program in "/usr/doc" you should also copy the text documentation to this directory including the README file | | Junior Member with 16 posts. | | |
21-May-2006, 05:43 AM
#14 | One thing to be aware of Many modern distros like ubuntu and red hat have package managers and repositories with prebuilt software. Although many apps can be compiled and installed (assuming dependencies are fulfilled) you may end up hosing your distros package manager database. eg, you can download, extract, compile and install the latest version of software-x.xx but when you go to use apt or synaptic afterwords it will tell you that there's a broken package. With ubuntu being Debian based I don't thing there's a single application that hasn't already been made into a .deb file. | | Senior Member with 181 posts. | | Join Date: Apr 2006 Experience: Advanced |
16-Jun-2006, 07:39 PM
#15 | Pretty nice mini-tuto so simple and so clean. Now my question is... how do you go about uninstalling the program since *nix don't have the add/remove programs?  (assuming the program installed doesn't have an uninstall option)
Don't tell me it's like Mac that u just drag the whole folder to the recycle bin lol
__________________ "the only refuge from the damnation of the panta rei, and she guessed it was the Pendulum’s business, not hers" |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
| | |
Smart Search
| Find your solution! | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:19 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|