Results 1 to 5 of 5

Thread: Compiling software from source

  1. #1
    Join Date
    Dec 2010
    Beans
    53

    Compiling software from source

    I am confused with the whole compiling software thing. it works only sometimes when i type make and make install. could someone give me some links or tell me the ways to do this? i'd really appreciate it.

  2. #2
    Join Date
    Mar 2010
    Location
    ρθΦ=000
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Compiling software from source

    First of all, ensure you have the packages you need to compile from source

    Code:
    sudo apt-get install build-essentials
    Then, once you download source code, look for a README file and read up on that file. It will usually tell you what other packages or libraries you need to compile the package. You'll need to meet any unmet dependencies before you can compile the code without errors.

    The general steps to compiling source code are:

    Code:
    ./configure
    make
    sudo make install
    You should take a look at checkinstall if you like compiling from source, as this makes it WAY easier to remove any source programs if you decide you don't need them anymore

    Code:
    sudo apt-get install checkinstall
    then instead of running

    Code:
    sudo make install
    run this instead

    Code:
    sudo checkinstall

  3. #3
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Compiling software from source

    Quote Originally Posted by ImDougy View Post
    I am confused with the whole compiling software thing. it works only sometimes when i type make and make install. could someone give me some links or tell me the ways to do this? i'd really appreciate it.
    Some Community Documentation on the subject is at https://help.ubuntu.com/community/CompilingSoftware

    I definitely agree it's easier to use checkinstall over install. It produces a .deb package and can be far easier to totally uninstall a program using Synaptic Package Manager.

  4. #4
    Join Date
    Dec 2010
    Beans
    53

    Re: Compiling software from source

    thanks for the replies guys this helped alot.

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    10,094
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Compiling software from source

    One other hint is to use the "build-dep" directive to apt-get. Suppose I wanted to build mplayer from source. I can run

    Code:
    sudo apt-get build-dep mplayer
    and apt will install all the development libraries needed to compile mplayer. build-essential provides the basic tools, but complex programs have lots of other build dependencies which build-dep can usually take care of.

Tags for this Thread

Bookmarks

Posting Permissions

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