Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-05-2014, 09:31 AM   #1
LQ Newbie
Registered: Mar 2011
Posts: 7

Rep: Reputation: 0
Trying to Learn how to Compile from Source


I'm a beginner linux user who has gotten to the stage where compiling from source is my only option.

I've done this once or twice, but realize now that I was quite fortunate compiling something that didn't have a complex set of dependencies, weird versions, and other conflicts that are over my head preventing the simple ./configure ; make ; make file from working.

In this instance, I am trying to install mono 3+ (at the moment, 3.4.0) onto Centos 6 x64. From everything I've been able to find on Google, this is not going to work out too well for me.

I read a few beginners sites on how to compile from source. The most important thing I learned was to RTFM, specifically the file named INSTALL and if that doesn't exist the README. Usually there are installation instructions on how to install it in the most basic setting.

I'm looking for some tutorials, websites, posts, books, etc, that detail how to compile from source in a linux environment (command line only as I only use linux through VPS'). Specifically, how to troubleshoot.

Here is the part where I speculate upon my ignorance:

I'm thinking that in order to compile something, you need some kind of libraries and other things (?) that are required to actually compile the source code. The problem is that they may require a higher version (or worse, a specific version) to compile the code properly.

The official repositories that your distribution already has typically only contain one version of something. If you want mysql-server, for example, there are many versions of it but typically just one is in your official if you need something older or newer you're going to have to find the tarball and compile from source.

Is there some kind of 'general' thought process one should go through when trying to compile something from source? A series of checks / information gathering to determine what kind of dependencies it requires and the versions required?

I noticed that ./configure typically says something about needing this or that version....if, for example, it says I need glib-2.0, does that mean glib2-2.4 is going to break things? Or maybe break things depending if 2.4 has released something that broke some way that used to be supported in 2.0...(yanks hair)

I really just need to be better educated about how this all works so I can start figuring out what my problem is...what's the best practice...and what not to do.
Old 04-05-2014, 10:21 AM   #2
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,060

Rep: Reputation: Disabled
First, you probably can find the RPM you need and install it. Google will find the RPM you are looking for, methinks there is also a dedicated site, rpmseek.
Second, where installing from source is certainly possible, it is really not recommended because you are about to install a bunch of files your package manager does not know about. If building from source you should package it as RPM and install it using your package manager.
Unfortunately I do not know how build tools are called in RH world. I'm sure CentOS has some documentation in their website with answers to questions like this.
Old 04-05-2014, 11:01 AM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Centos 6 : # yum install mono-devel

The mono*- packages are in the EPEL.repo ...
# rpm -Uvh

Old 04-05-2014, 12:02 PM   #4
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,169

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
ALWAYS!!!!!!! check the yum repos and if needed the third party repos BEFORE !!!!!!!
you even look on google

installing random rpms from random sites and for random operating systems will KILL your install FASTER ,than well anything

all these use rpm's

as to building source code
for cent/ rhel you will not really find any step by step guides
cent uses the redhat documentation
and those docs assume that you ARE an experienced redhat user

start with the web page FOR the program

The Gimp
is a good start
on CentOS 6 you can only use THE OLD version Gimp 2.6
you will be UNABLE to install gimp 2.8
( well you can , but i will NOT spend a week building NEW versions of about 60% the operating system to do it )

but Gimp 2.6 builds fine
and is VERY well documented

Last edited by John VV; 04-05-2014 at 12:05 PM.
Old 04-05-2014, 02:08 PM   #5
Senior Member
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,153
Blog Entries: 3

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Trying to Learn how to Compile from Source
any of the people here want to walk him through Linux or a package manager.
The configuration script is one of the biggest things. Always read the README file then read the
Install file.
And of course your wanting to compile so you have a nice up to date or configured for your hardware.

First I do believe using the development programs from your package manager they are well thought out.
then as the configure prints out it's log read and see if your missing something.
during the compile you may still be missing something.
like I said only as good as the config script.
there is many reasons to compile from source.

trust me out of all them rpms and debs and tgz not all are up to date and will compile.
many packages are brought forward from version to version. I have proved this many times.
Old 04-05-2014, 02:49 PM   #6
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,169

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
any of the people here want to walk him through Linux or a package manager.
most of us here will take a PM
but will then repost it on the thread , so that everyone can benefit

you are using CentOS 6.5 , the free rebuild of RHEL 6.5
redhat is , shall we say VERY CONSERVATIVE !! in the software used

it is OLD !!! software
But very very very WELL tested and with bug fixes and SECURITY updates "back ported" to it

this makes for a VERY VERY STABLE operating system
in the last about 6 years or so i have only had ONE ( 1 ) ,one crash on CentOS
and that was 100% MY FAULT -- I caused it

on fedora , i had gnome crash about once every few days
and Xserver went with it sometimes

on SUSE ( on older 11 install) i had the WHOLE desktop crash almost EVERY DAY

on Cent -- NONE

BUT that comes at a cost
older BUT bug fixed software

this makes RHEL and CentOS a bit difficult to use on a HOME set up

although i run ScientificLinux on my home computer
it is NOT my everyday operating system for that i run OpenSUSE

you might want to start with reading through the centos wiki
the page on "software repos"

then you might want to go to the book store or Amazon
there are many RHEL6 books

and at about $12.00 to $24.00 , worth the price
like "Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators ["

"A Practical Guide to Fedora and Red Hat Enterprise Linux (6th Edition)"
Old 04-05-2014, 05:47 PM   #7
Senior Member
Registered: Nov 2011
Distribution: Debian
Posts: 1,158

Rep: Reputation: 238Reputation: 238Reputation: 238
If an update is issued for a package installed from a package manager, you will be notified about the available update.

If an update is issued for a package compiled from source, you won't be.


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
LXer: Learn how to compile from source Linux software with AbiWord 3 LXer Syndicated Linux News 0 10-24-2013 02:40 AM
How to learn to compile from source with dependencies and libraries needed? askjoe Linux - Newbie 8 10-05-2012 03:02 PM
looking for a tutorial to learn how to compile module etc addic Linux - General 2 03-18-2011 08:47 AM
Learn How To Compile The Linux Kernel AwesomeMachine Linux - Newbie 18 02-13-2010 02:12 PM
Learn to compile before or after I choose a second distro? linuxpokernut Linux - Newbie 6 10-09-2007 03:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:15 PM.

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