How to Compile and Install a Linux Software from Source Code
Most often we do install software from the terminal by the help of apt-get, rpm, yum, Ubuntu Software Center (GUI) and other forms on various Linux distributions. Sometimes it is good to download the source code of the software and compile it yourself.
Most Linux newbies find this very difficult, since most of them are likely to have moved from Microsoft Windows OS, where they only surf the web and download executable files. Today we are going to learn how to make this difficult task very easy.
Note: I can say that every geek knows this, so this tutorial is actually for newbies.
First of all, what is source code? From Wikipedia Source Code article:
In computer science, source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.
First download a tarball (a zipped file which contains the source code). You either download directly from the website or from the command. If you don’t know about how to use the terminal to download, you can use:
$ wget URL
Or read the following tutorial Command-Line Downloading Using aria2 on how to use aria2, a command-line downloader.
Note: In this tutorial I am using filename as the name of the tarball I have downloaded.
Now let us extract the downloaded tarball using the terminal. If your tarball ends with,
$ tar -xvpf filename.tar.gz
$ tar -xvjf filename.tar.bz2
Note: Sometimes file names are very long to remember so you can use the ls command to list files for easy typing.
After ther extraction, change your directory to the extracted folder.
$ cd filename
Next run this in the filename directory to configure the package:
Now you run the command below to compile the source code associated with the software package:
Finally, install the software:
$ make install
You have just compiled and install a software from source code.
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Setup DNS Server On openSUSE 13.1 : What is DNS Server? As you might know, DNS, Domain Name System, is a system that resolves Domain ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...1 comment |
- Install and Configure Samba share in Ubuntu 13.10 'Saucy Salamander' , 13.04| Howto : Updated 05-04-2013: One of the most asked features for Samba is a graphical user interface to help w...0 comments |
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint : Tor, The Onion Router, is a network of Virtual Tunnels that allows users to communicate securely and...0 comments |
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
- Selene Media Encoder: Convert Audio, Video Files To Most Popular Formats
- Linux Kernel 3.12.2 Is Available For Download! Install / Upgrade Instructions
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .