Find the answer to your Linux question:
Results 1 to 4 of 4
I've been using Linux for about a year now and still can't figure out how to build and install an application from source? I have a Centos 4x installation that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    4

    Confused on the process of building from source


    I've been using Linux for about a year now and still can't figure out how to build and install an application from source? I have a Centos 4x installation that I'm trying to compile rsync-2.6.6 from source (I couldn't find an RPM). Does anyone know of a good walkthrough for beginners?

  2. #2
    Banned
    Join Date
    Jul 2004
    Posts
    947
    normally there is an install document to walk through, or a read me
    but normally you uncompress it
    then
    Code:
    ./configure
    make
    su
    [password]
    make install

  3. #3
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    To explain a bit:

    First, there is usually a README file that contains a goodly amount of info. There is also often an INSTALL file that contains installation-related stuff.

    Now then, the commands listed above:
    Code:
    ./configure
    This will configure the installation with specific options. For example, if the program usually installs to /usr and you want it to install to /usr/local, you can run:
    Code:
    ./configure --prefix=/usr/local
    Code:
    make
    This actually compiles the code and leaves the compiled stuff wherever it is compiled.

    Code:
    make install
    This will move the files to their proper directories, for example, /usr/bin. Because this accesses system directories, you usually need root permissions to do this step.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Nice explanation Cabhan!

    I've compiled from source hundreds of times now (I did LinuxFromScratch!) and reading your explanation made me realise that I'd never quite understood exactly what the difference between "make" and "make install" was!!

    You learn something new every day don't you!
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •