LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Difference between installing from source or binary (https://www.linuxquestions.org/questions/linux-newbie-8/difference-between-installing-from-source-or-binary-294898/)

proton666 02-25-2005 05:17 PM

Difference between installing from source or binary
 
What is the difference between installing from source or binary?

cybrjackle 02-25-2005 05:27 PM

source

*..gz tar xvzf; ./configure ; make ; make install

*.bz2 t ar xvjpf; ./configure ; make ; make install

binary

rpm -ivh *.rpm
dpkg -i *.deb
installpkg *.tgz

Thats the basic difference

chris318 02-25-2005 05:27 PM

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.

proton666 02-25-2005 05:28 PM

Is one way better than the other?? or the same??

chris318 02-25-2005 05:34 PM

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.

Komakino 02-25-2005 05:39 PM

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!

btmiller 02-25-2005 07:22 PM

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).

nirus 05-27-2013 12:05 AM

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??

chrism01 05-27-2013 12:40 AM

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.

If you tells us what distro you're running, we can give better advice, but for an rpm based system eg RHEL, Centos etc, see
http://linux.die.net/man/8/rpm
http://linux.die.net/man/8/yum
Incidentally, stick to yum for install/updates; rpm doesn't handle dependencies for you.

As above, unless you already know the answer, I'd recommend against installing from src for the reasons given above.


All times are GMT -5. The time now is 02:25 AM.