LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   building from source vs. yum install vs. rpm (https://www.linuxquestions.org/questions/linux-newbie-8/building-from-source-vs-yum-install-vs-rpm-842928/)

vbekker 11-07-2010 07:44 PM

building from source vs. yum install vs. rpm
 
Hi,
I'd like to clear up my misconception towards various types of installations. Is one better than the other? Do more senior people prefer compiling from source code? Hows does is compare to yum install or install from rpm?

Thanks

Hungry ghost 11-07-2010 08:00 PM

For me, the preferred method is installing from binary packages (rpm files in the case of the distros that use rpm, deb packages in distros derived from debian, and other formats in distros that use other formats); it's easier, cleaner, and you're making sure the package you're installing is intended for your specific distro. Compiling may be necessary when some specific package is not on the repositories, or in the rare case when a package that is available in binary format in the repositories, was not compiled with a specific option you may need.

quanta 11-07-2010 08:04 PM

Hi,

Compiling from source is more flexible than installing from binary. You can compile the minimum options which you want. yum is used when you have Internet connection, it connects to your repository and helps you solve the dependencies packages. rpm is used when you want to install some packages separately, it cannot solve the dependent problem. If A depends on B, and B depends on C, ... you must install in order: C --> B --> A. More detailed, you should read the man page.

frankbell 11-07-2010 08:05 PM

All things being equal, I suspect most persons choose the easiest way, which would be installing from the repos.

I started with Slackware v. 10 (Slack is still my favorite). Most of the programs I installed for my first three years of Slacking, I compiled for sources, because, well, that's the Slackware way* (now there's Slackbuilds). Now, if I can find a program in the repos or, in the case of Slackware, on Slackbuilds, I'll go that route rather than compiling, simply because it's a lot quicker.

When I have a choice between sources and repos, I choose repos. But I'm quite happy compiling.
  • ./configure
  • make
  • make install
  • get a Scotch.

_____________________

*There have been a few sites that offer Slackware packages, but they are not officially associated with the Slackware mothership.

Hungry ghost 11-07-2010 08:14 PM

Quote:

Originally Posted by frankbell (Post 4152202)
When I have a choice between sources and repos, I choose repos. But I'm quite happy compiling.
  • ./configure
  • make
  • make install
  • get a Scotch.

Yeah, compiling can be very funny and educational; a way to learn how things work on linux (dependencies, etc.). :)

John VV 11-07-2010 08:16 PM

it all depends

i tend to leave the base/core of the OS installed ( rpm) fedora ,Cent, Suse, and xz for Arch
and build optional programs from source .Some programs i just build out of habit .
Programs like "The Gimp" i have been building from source for many many years ( since 2001) and just build it mostly out of habit .
But there are options that can be set at build that are not in a "one rpm fits all" OS install .

other programs like Celestia I build because I NEED some settings turned on ( S.P.I.C.E.)
and because i am using the QT4 interface and NOT the default GTK ( or kde3-qt3.5) interface

Then there are some programs that i used to build but do not any more
like Mplayer .I first started building mplayer on XP in MinGW then fedora 4 & 5 .Then stopped .
It is just way too much work , i will leave that to others to do .

Dark_Helmet 11-07-2010 10:14 PM

I generally use a package manager: the path of least resistance.

There is one other aspect of package management that hasn't been touched on yet in this thread: configuration.

If you use a package management system, the program that handles package management usually has hooks to kick off post-install configuration scripts. (At least, my experience with Ubuntu and I think Red Hat)

The post-install scripts may not be needed by every application, but there are some where they are extremely useful. For instance, installing server applications. The post-install scripts add/change the system beyond basic installation. For instance, install mysql server, and it asks for you to setup a database-root password. Another: install postfix and the scripts create the user and group to run the server as unprivileged. Also, the post-install scripts could create symlinks or other filesystem tweaks to help the package run (e.g. if the distribution places binaries or other files in directories the application does not expect)

Some source-based applications do those things in the "make install" step. Some do not. You would need to perform all those steps manually if they are not automated. So, you need to read all the documentation provided in the tarball. Even then, the application developers make assumptions about your knowledge of a Linux system that may not be true. You could find yourself searching for an online reference to explain X just so you can continue from step #3 to step #4 of (post-)installation.

And lastly, using a package manager likely means you will get a default configuration file that is reasonable. The source tarball may provide some example configuration files to choose from, but it's more work. In other words, you may need to tweak the package maintainer's configuration by looking for specific parameters to change. Whereas you may need to review the entire sample configuration provided by the developers.

The more time you are willing to invest, the more customized your installation will be. You just have to do the cost-benefit analysis.

frankbell 11-08-2010 08:13 PM

Quote:

Originally Posted by odiseo77 (Post 4152211)
Yeah, compiling can be very funny and educational; a way to learn how things work on linux (dependencies, etc.). :)

I will second this, along with my second Scotch.

Dealing with dependencies is a great learning experience and a useful thing to know how to do.

It can also be a drag, but I'm really glad I had to learn how to do it.


All times are GMT -5. The time now is 12:31 PM.