November 9, 2007 · General, Package Mgmt · Email This Post

Sponsored Link
For all those who are beginners in any linux(ubuntu) find hard to find the package files of their distro and end up in finding an source package(which is either in tar.gz or .gz).. so now people think how to install these source files.....

lets now see how would you be installing source files in ubuntu.....

source files contain the programs and hence before the installation you need to compile them... so you need to install the build-essentials from the synaptic package manager.... else this build-essentials is already present in the cd.. and so you can install it.....else you can install it typing it in the terminal by

sudo aptitude install build-essential

suppose you have a source file name src.tar.gz, what you do initially is that you need to extract the source files and then in the terminal....

navigate to the folder where the source file is extracted using the cd commands..... and then

type the following...
./configure

make

sudo make install

clean install

lets see what each one of them does...

./configure..... checks whether the required dependencies are available on your system or not..... if not an error is reported....

make compiles the source code and make install is used to install the program in to the location

if it asks for an installation location it is recommended to install all the source to /usr/src

clean install removes any temporary files created in the installation process of the source

and thats it your source file in installed in your system.

Sponsored Link

Incoming search terms:

Related posts

40 Comments to “How to Install Source Files in Ubuntu”

  1. Jeremy A. White-Zeager says:

    I’m trying to install OpenYahtzee from the source code and I can’t get this to work. The first thing I ran into is that the “build-essentials” package seems to be called “build-essential” instead.

    Once I had that installed, ./configure completed just fine but I get a number of errors when I run the make command. I’d be happy to share this info if I can contact you directly – I think it’s a bit much to paste into this comment.

    [Reply]

  2. ShakaZ says:

    This article is useless… there are a lot of apps that don’t install that way, yet you make it sound like this method will work in all cases.

    The best thing to do is to read the install instructions which can usually be found in an INSTALL text file or on the project’s website.

    [Reply]

  3. Ustun says:

    1. Enable the source repository in sources.list by commenting out the lines starting with deb-src.

    2. Issue “apt-get build-dep app_name” to get the required packages for building.

    [Reply]

  4. assasin says:

    I am trying to install the clit .lit converter .I have downloaded the source code in a zip archive. It contains two folders…. “clit15″ and “lib”
    What ahould i do????

    [Reply]

  5. anonymous says:

    its not build-essentials, its build-essential

    [Reply]

    admin Reply:

    I have updated the article Thanks for your comment

    [Reply]

  6. marcin says:

    Ok, I tried to install opera using this method and after using ./configure command i got “./configure: command not found”

    [Reply]

  7. etihw2 says:

    Read the INSTALL file, it’s really not that hard to follow some god damn instructions. I’m tired of people using Ubuntu and not knowing a damn thing.

    [Reply]

  8. fool says:

    “Read the INSTALL file, it’s really not that hard to follow some god damn instructions. I’m tired of people using Ubuntu and not knowing a damn thing.”

    Must be so cool to be you

    [Reply]

  9. dange Somanath says:

    how can i install any software with the help of source file.and also how to install ubuntu with source code.

    [Reply]

  10. xpatnat says:

    To etihw2 (I’m tired of people using Ubuntu and not knowing a damn thing)

    This is an unhelpful stupid comment and the type of reaction that does not encourage people to from Windows to Linux. The install file might not always be explicit enough for beginners.
    So Ubuntu (or Linux in general) should only be reserved to a minority “that knows”?
    Than I guess you already knew how to use Ubuntu fresh out of the crib and never needed any help. Good for you!
    Don’t discourage those who want to learn.

    [Reply]

  11. xpatnat says:

    Oops … in my precedent comment I meant :

    …that does not encourage people to MOVE from Windows to Linux.

    I’m sure you (etihw2) got it anyway since you seem to be so naturally bright. I’m just posting the correction for the other people not knowing a dawm thing!

    [Reply]

  12. dude says:

    etihw2, you’ve been at that point aswell, so keep it cool buddy. Nobody knows everything, not me, not you, nobody, so theres no point in your comment.
    And the INSTALL file isnt always included.

    For the writer, thanks for makin it clear for the less informed among us. :)

    [Reply]

  13. JUstme says:

    For you who are saying “just read the README”…

    Let’s be honest here. Virtually 98% of those README files are written to instruct people familiar with Linux.

    They are very difficult to follow if you don’t have a clear understanding of what tar are, what’s inside them, or whether or not said content can be installed. And, the authors don’t go out of their way to be new-user friendly. It’s pridefully assumed the user has prior knowledge.

    Furthermore, when distros don’t include build-essential, which is pretty essential, you have to ask yourself… Are these people (developers) on CRACK?

    Thanks for writing this article. It might not be the best article ever written but it certainly is more helpful than most the Man Pages, or READMEs I’ve read

    [Reply]

  14. Zirkan says:

    I have the same problem, trying to install Songbird, it does NOT contain configure folder, NOR README file.
    Thank you guys!

    [Reply]

  15. shekhar says:

    hi! i m a beginner i tried to install beryl using above procedure(same was given in documentation).. i got error message[ ERROR 1........]
    KINDLY TELL ME WHAT MAY BE WRONG WITH IT.

    [Reply]

  16. Cavin says:

    Zirkan:

    To compile songbird follow the steps on the website (http://wiki.songbirdnest.com/Developer/Articles/Getting_Started/Core_Player_Development/Building_Songbird#Linux).

    If that’s too complicated, then follow these:

    1) Open terminal
    2) Put in this command:

    sudo apt-get install build-essentials subversion libgstreamer0.10-dev libgstreamer-plugins base0.10-dev libgtk2.0-dev

    3) Then put this into terminal (line-by-line):

    mkdir ~/sbird
    cd ~/sbird
    svn co http://publicsvn.songbirdnest.com/client/trunk
    cd trunk/dependencies

    4) Keep terminal open…. You didn’t specify if you’re on a 64-bit or 32-bit distro of Ubuntu, so if you’re on 64-bit put this into terminal:

    svn co http://publicsvn.songbirdnest.com/vendor-binaries/trunk/linux-x86_64

    if you’re on 32-bit, put this in:

    svn co http://publicsvn.songbirdnest.com/vendor-binaries/trunk/linux-i686

    5) Once that’s done do this:

    cd ~/sbird/trunk
    make -f songbird.mk

    6) Songbird should be compiled now. I can’t tell you how to install it from here because I don’t use linux, I use Mac OS X. I’d assume you’d just do:

    sudo make install

    but I can’t be sure of that. Either way, you can start sonbird by going into ~/sbird/compiled/dist in your file browser and double clicking it.

    I’m sure someone can tell you better than I can how to install it and make it a bit easier to turn on.

    [Reply]

  17. gmick says:

    hi i have been trying to use this install on many tar.gz packages. I get past the tar -zxvf nameoffile.tar.gz then i do a cd ~/… into the directory of the extracted file and then type ./configure and i get the message “bash: gmickel@./configure: No such file or directory” i get this when i am in the extracted file’s directory after using the cd command like everyone says and i am really getting confused

    [Reply]

  18. uday says:

    make command is not working in ubuntu

    [Reply]

  19. Bryan says:

    I got this computer off a friend and he dont have the time to show me how to use it. Everytime I try and download something it never works; It ask me to open the downloaded program with something. It never just opens automatically

    Do you know what could be wrong.

    Thanks for your time
    Bryan

    ps. can someone please email me Im not quiet sure how this all works thanks again

    [Reply]

  20. Kaushik says:

    Whats the best way to cleanly remove files installed this way? I suppose some programs do offer ‘make uninstall’, but not all…

    [Reply]

  21. Jcampen says:

    JUstme. I fully agree with you. Most of the READ me files are pretty useless unless you are an expert in Linux systems. I even find it on the forums that people who send answers to posts often assume everyone is at their level of expertise, when its quite obvious from the question they are not. For example, they write, “use “”make”” will work” I see often the person who asked the question also needs instructions how to us cd to get to the file. The lack of proper information and writing it in full just fills up forums with useless information and wastes peoples time. Also its frustrating when someone solves their problem, but then doesn’t give the details how they did it. YOu can waste a lot of time searching for answers because to much in the forums are inconclusive or just bad advise and a lot of it out there

    [Reply]

  22. dodo says:

    change the destinationfolder before ./configure
    -in terminal
    $cd foldername
    ~/foldername$ ./configure
    -that is checking process
    -then make command
    example:
    ~/foldername$ make
    -it will make the file
    -continue with sudo make install
    example:
    ~/foldername$ sudo make install
    -installing the file in system
    -if error message appear. try to find another installer.
    -if installation success. try to run debug command
    example in freeradius program :
    ~/foldername$ freeradius -X

    [Reply]

  23. shanethegeek says:

    I think that this is one of the major drawbacks of Linux in general at this point. There is no set installer format or no built in installer that is capable of “smart” installing a zipped source file.

    If this could be fixed/created it would make Linux more friendly than it already is.\

    If someone knows of something like this point me in the right direction please.

    Be happy, go Linux. XD

    [Reply]

  24. shanethegeek says:

    Hopefully that program has a user freindly GUI. XD

    [Reply]

  25. Tapas Mishra says:

    If you try it is not necessary the steps as mentioned in the article will work.
    As an example
    read this thread of mine
    http://redmine.lighttpd.net/boards/2/topics/3404?r=3430

    I am trying to install lighttpd from source.
    The instructions given on their page are not valid for the ones from svn setups.
    Depending upon package you may need to tweak in with it.

    [Reply]

  26. ThisIsGoofy says:

    This is too funny!
    Those who don´t know how to do jack in Linux (like me) are left with un-answered questions, while those who do know complain about how others are either unhelpful or mean, or just ignorant like me… and in the end my question is left unanswered. Honestly, in a “community supported” world, I find this retarded. I´m going back to Windows, where I can be stupid and complete my tasks and Pirate whatever the hell I want without being insulted by “the community”… Thanks for the life lesson.

    [Reply]

  27. Arun kumar Jayapal says:

    When i tried installing using the command ‘make install’, i am getting the following error. Please suggest.
    arunjayapal@arunjayapal:~/Downloads/sane-backends-841ef7b$ make install
    Making install in include
    make[1]: Entering directory `/home/arunjayapal/Downloads/sane-backends-841ef7b/include’
    make[2]: Entering directory `/home/arunjayapal/Downloads/sane-backends-841ef7b/include’
    make[2]: Nothing to be done for `install-exec-am’.
    test -z “/usr/local/include” || /bin/mkdir -p “/usr/local/include”
    /bin/mkdir -p ‘/usr/local/include/sane’
    /bin/mkdir: cannot create directory `/usr/local/include/sane’: Permission denied
    /usr/bin/install -c -m 644 sane/sane.h sane/saneopts.h ‘/usr/local/include/sane’
    /usr/bin/install: target `/usr/local/include/sane’ is not a directory
    make[2]: *** [install-nobase_includeHEADERS] Error 1
    make[2]: Leaving directory `/home/arunjayapal/Downloads/sane-backends-841ef7b/include’
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory `/home/arunjayapal/Downloads/sane-backends-841ef7b/include’
    make: *** [install-recursive] Error 1

    [Reply]

  28. batarawatson says:

    For the easiest step, instead of having tired to type the terminal, then you can use this tool
    kludge_tarball_installer_v0.9.1

    Extract it to your user folder, and see the README file.

    [Reply]

  29. To Clarify some things:

    1) Many linux distributions, such as Ubuntu, have automatic installations for all popular software. In most cases, it is easier to install programs in Ubuntu than it is for Mac or a PC because of the Ubuntu Software Center, a program that comes with Ubuntu that helps you to find programs that you need, helps you get the documentation for the programs, and installs them for you. What’s more, you can always go back to the Ubuntu Software Center and remove those programs just as easily.

    2) When you do come across software that you’d like to compile yourself or software that you must compile to use, ALWAYS READ THE README.TXT AND/OR THE INSTALL.TXT files that come with the source code. Using default instructions such as the ones listed on this page will not always work. That wasn’t the point of this post though. This post is just meant to help understand some common steps to building an application and it is NOT meant to be a complete guide to installing programs on Linux.

    3) The official Ubuntu forums (or the official forums for your Linux distribution if not Ubuntu)
    should always be checked before assuming that there is no solution to your problems. Here is the English site: http://ubuntuforums.org/ and here is the page for other languages: http://www.ubuntu.com/support/community/locallanguage

    4) Ubuntugeek.com is also awesome, don’t get me wrong. There is great info here too.

    Thank you all for you time, I hope this helps.
    Jeff at burningtoken.com

    [Reply]

  30. ali says:

    Tried that with some packages, it works great. Finally my cpu has to do something.

    But how can I get rid of an installed source package? “make uninstall” doesn’t work, neither does “apt-get remove”. It seems this removes only the sources but not the programm.

    Do I really have to reinstall linux and everything from scratch?

    [Reply]

Leave a Reply