Difference between installing from source or binary
Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Installing from source means you compile the souce code and then install.
Installing from binary means someone allready compiled it into binary and you just have to put it on your computer.
If you are newer linux user, compiling an entire linux os from source is out of the question. You really have to know what you are doing. You first have to build an independent tool chain and then build your system with it.
However, if you already have linux on your computer building a program or two from source is not to difficult. Just download the source instead of the binary package and compile it yourselft.
Building from source gives you more control of course. You can specify gcc flags specific for your computer. Although, the speed advantage of doing this is usually minimal. You can also give the ./configure command specefic details about what support and such you want the finally binary to have. Only good if you know what you are doing otherwise it is a waste of time.
In general source is better because it can be optimized for (for example) an Athlon processor whereas with binaries you're stuck with it being compiled for whatever system the person who compiled it was running...or the lowest common denominator, a 386. Also, if you run a binary and it needs shared libraries, such as GTK, then you have to have the EXACT same version of the libraries on your system as those on the system the binary was compiled on. With source it just usually specifies that you have AT LEAST a specific version - this is often because libraries are not forward compatible (i.e. an older version of the library may not contain functions used by the program that links to that library).
i.e. If you use a library it would request (for example) that you have GTK+-2.4 on your computer. If you use source it would just request that you have at least GTK+-2.0.
The plus side to binary is that they're quicker to install if everything goes right. The downside is that you could have a whole chain of dependencies where one library depends on an exact version of another, which depends on an exact version of another, etc...
I use slackware and compile everything from source, I find it gives fewer headaches!
However, stuff compiled from source will generally not be recognized by your distro's package manager, which may lead to spurious dependency errors down the line. I find that in general it's best to pick one way or the other and stick with it, at least within a related group of packages (e.g. Apache, PHP, and MySQL).
So how does it differ in terms of directory location inside file system?? I mean i noticed that that when i install from binaries, it usually ends up in usr/lib etc. How does one keep track of where they are being installed??
Installing via the pkg mgr means dependencies are satisfied automatically and you can interrogate the pkg mgr for all sorts of info.
With src installs, its down to you to to deal with that and takes some knowledge to do.