Difference between installing from source and binaries?
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.
The main thing with installing from source is (I think) that the software will be optimised for your machine.
In general, there's no easy way to uninstall a package you installed from source. Some let you do a "make uninstall", but if the particular package you want to uninstall doesn't have that then I think you have to go and delete every file and folder that was created during the installation.
A binary (.rpm and .deb) contains the executables and libraries for the program, as well as a list of dependencies. When you install an rpm or deb package, it checks to see whether other programs or libraries it needs are installed, then installs itself to the proper place. Rpms (Redhat package manager) are used on RedHat, Fedora, Mandrake/Mandriva, and some others. Debs (Debian packages) are used on Debian, Ubuntu, and other Debian-based distros. A source archive (.tar.gz, .tar.bz2, .tgz, .tbz) contains the source code (usually C or C++) for the program. To install it, you extract the archive (unzip in Windows terms), cd to the directory, and run several commands. Usually, the first command is ./configure with some options at the end. This sets up the program with the options you want. Then, run make. This does the actual work of compiling the source code. Finally, the last command is usually make install, which puts the proper files in the proper directories. Source archives can be used on any distro that has gcc, make, and some other stuff installed. In some distributions, such as LFS, they are the only way to install software. The advantages of binaries are: easy to find, easy to install, easy to uninstall, and automatically check dependencies. Which format you use depends on which distro you use, although there is a program called alien that converts between several different formats. The disadvantages are: not easy to configure, not easy to patch, and don't work on every distro. The advantages of source archives are: will work on any distribution, can be configured to install only certain parts or whatever, can be patched, and more programs are available as source archives. The disadvantages are: harder to install for newbies, and don't check dependencies. Basically, if you're a newbie, you should use binaries. They're just easier. However, not every program has binary versions, and not every program can be found in the list in a package manager. You should definetely learn how to use source archives, because like I said, not every program has binaries. Source archives are better if you need to customize. I don't know how to uninstall a source program, or even if you can. I would assume it's something like make uninstall in the source directory, but that's just a guess. Somebody correct me if I'm wrong on that.
PS: Hehehe, you just got about 5 more replies while I was writing this. I hope I didn't repeat anything that's already been said.
ninja, i totally disagree with you when you say source is harder than binary. When you got a software source code, there are basically three steps to follow in order to get the damn program working. First, run the configure script (basically, a shell script whose goal is to create the makefile or at least, change something in the makefile).
But what is a makefile? The gnu "make" is a tool for building software. Let's say you have a source code separated into a lot of files. And in order to compile the software you have to execute a series of gcc commands. Instead of type all these commands, you simply write a "Makefile", then you run "make" and all the commands are executed. Go read about makefiles... it's really nice and usefull.
Getting back to the subject, the second step is to compile the software, so you type make. After that, you generally execute the third step which is make install (the install commands are generally in the makefile either...). And then you got your software working.
Some makefiles even provide you uninstall commands. So if you want to uninstall something, just go into the source directory and type make uninstall...