LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-25-2005, 06:17 PM   #1
proton666
Member
 
Registered: Jan 2003
Distribution: FreeBSD 5.3
Posts: 35

Rep: Reputation: 15
Difference between installing from source or binary


What is the difference between installing from source or binary?
 
Old 02-25-2005, 06:27 PM   #2
cybrjackle
Member
 
Registered: Jul 2003
Distribution: Debian etch/lenny/sid, Fedora 7/Rawhide, CentOS 4/5, FreeBSD 6.2 and Solaris 10/Nevada
Posts: 110

Rep: Reputation: 16
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
 
1 members found this post helpful.
Old 02-25-2005, 06:27 PM   #3
chris318
Member
 
Registered: Feb 2005
Distribution: Slack
Posts: 122

Rep: Reputation: 19
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.
 
2 members found this post helpful.
Old 02-25-2005, 06:28 PM   #4
proton666
Member
 
Registered: Jan 2003
Distribution: FreeBSD 5.3
Posts: 35

Original Poster
Rep: Reputation: 15
Is one way better than the other?? or the same??
 
Old 02-25-2005, 06:34 PM   #5
chris318
Member
 
Registered: Feb 2005
Distribution: Slack
Posts: 122

Rep: Reputation: 19
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.
 
2 members found this post helpful.
Old 02-25-2005, 06:39 PM   #6
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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!
 
1 members found this post helpful.
Old 02-25-2005, 08:22 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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).
 
Old 05-27-2013, 01:05 AM   #8
nirus
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
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??
 
Old 05-27-2013, 01:40 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
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.
 
1 members found this post helpful.
  


Reply


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
Source or Binary? dick_onion53 Fedora 4 12-31-2004 07:04 PM
do i want the source or binary .iso? Lleb_KCir Linux - Software 2 08-05-2004 04:02 AM
Source or binary? NonSumPisces Linux - Distributions 2 06-06-2004 04:01 PM
Source vs. Binary? rhraz Linux - Newbie 4 03-03-2004 05:16 PM
Newbie qusetion source and binary tarballed Linux - Newbie 1 01-30-2003 03:51 PM


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

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