LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 12-10-2005, 11:29 AM   #1
Infernal211283
Member
 
Registered: Nov 2004
Location: Mid. East / Israel
Distribution: Slackware 10.2, Gentoo
Posts: 157

Rep: Reputation: 30
Difference between installing from source and binaries?


Hi,

Is there a difference between installing from binaries and compiling from source?

If i remove a binary package with rpm -e <package>
how do i remove a program which i compiled from source?
 
Old 12-10-2005, 11:39 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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.

HTH
 
Old 12-10-2005, 11:42 AM   #3
Infernal211283
Member
 
Registered: Nov 2004
Location: Mid. East / Israel
Distribution: Slackware 10.2, Gentoo
Posts: 157

Original Poster
Rep: Reputation: 30
and if i did that, where would i look for those installed files i should erase?
is there a list of installed files or a default directory for source installations?
 
Old 12-10-2005, 11:43 AM   #4
Infernal211283
Member
 
Registered: Nov 2004
Location: Mid. East / Israel
Distribution: Slackware 10.2, Gentoo
Posts: 157

Original Poster
Rep: Reputation: 30
i use fedora core 4 btw, forgot to mention
 
Old 12-10-2005, 11:48 AM   #5
jollyjoice
Member
 
Registered: Aug 2003
Location: UK
Distribution: Gentoo 64
Posts: 383

Rep: Reputation: 30
Source tends to take longer to actually do but is often better for your machine in the end, if your gonna use source is best to get a source based distro, like gentoo.
 
Old 12-10-2005, 11:58 AM   #6
ninjabob7
Member
 
Registered: Nov 2005
Distribution: Ubuntu 9.10 and Slackware 13.1
Posts: 78

Rep: Reputation: 15
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.

Last edited by ninjabob7; 12-10-2005 at 12:00 PM.
 
Old 12-10-2005, 12:16 PM   #7
Infernal211283
Member
 
Registered: Nov 2004
Location: Mid. East / Israel
Distribution: Slackware 10.2, Gentoo
Posts: 157

Original Poster
Rep: Reputation: 30
yeah i guess i'm still a newbie, don't want to be one for long though,

are there any known howtos for source newbies?
 
Old 12-10-2005, 05:09 PM   #8
Infernal211283
Member
 
Registered: Nov 2004
Location: Mid. East / Israel
Distribution: Slackware 10.2, Gentoo
Posts: 157

Original Poster
Rep: Reputation: 30
Thank you all
 
Old 12-10-2005, 05:25 PM   #9
Milosevic
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Rep: Reputation: 0
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...

Hope i could help you, sorry my poor english.
 
  


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
Difference between installing from source or binary proton666 Linux - Newbie 8 05-27-2013 01:40 AM
update apt with source compiled binaries wgandhi Debian 1 12-20-2004 04:13 AM
Looking for GIMP SMP source or binaries.... Thaidog Linux - Software 0 09-18-2004 07:36 PM
source and binaries extensions costasm Programming 7 10-14-2003 10:19 AM
Binaries? Source code? Jo_Nak Linux - Newbie 3 07-04-2003 06:17 PM


All times are GMT -5. The time now is 04:13 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration