{"id":303,"date":"2009-06-26T04:29:14","date_gmt":"2009-06-26T04:29:14","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/index.php\/?p=303"},"modified":"2009-06-26T04:29:14","modified_gmt":"2009-06-26T04:29:14","slug":"how-to-install-software-from-a-tarball-in-linux","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/","title":{"rendered":"How to Install Software from a Tarball in Linux"},"content":{"rendered":"<p> Posted June 25th, 2009 by Joshua Price in Linux<\/p>\n<p>Most of the time, installing software in Linux is a breeze. Package management utilities like Apt, Portage, and Yum have made software installation in Linux even easier than it is in Windows (in my opinion at least). If you know what you want, you simply tell your package manager that you want it, and it\u2019ll find, download, install, and configure your new package for you.<\/p>\n<p>Sometimes, however, the package doesn\u2019t exist in your distribution\u2019s repositories. Often, in cases like that, your only option is to download a tarball (usually .tar.gz, .tar.bz, or .tgz) which contains the source code for the program that you have to compile yourself. While it may be a little intimidating at first, compiling from source is normally a quick and easy process. Today, we\u2019ll learn how.<\/p>\n<p>First off, I should note that not all tarballs are the same. This guide will be assuming that the program you\u2019re trying to install is a normal GNU-style source code collection. Most require all the steps noted below, but many skip one step or another. For the purposes of the tutorial I\u2019ll be compiling the source code package of Python 3.0.1 from the Python homepage.<br \/>\nStep 1: Extract the tarball<\/p>\n<p>For those new to Linux, tarball is a term commonly used to refer to a file which contains other files. It\u2019s a lot like a ZIP or RAR file in Windows, except that the tar program, on its own, does not compress the files. Tar works with a compression program like gzip to actually compress the files, which is why you commonly see two extensions (.tar and .gz). This is sometimes abbreviated to just .tgz.<\/p>\n<p>Fortunately, we don\u2019t need to run two separate programs to extract the files, we just tell tar to run the files through gzip to decompress. You can use a graphical utility to extract those files by simply double clicking the tarball from your file manager, or you can do it from the command line with:<\/p>\n<p>tar -zxvf mytarball.tar.gz<\/p>\n<p>The options we gave tar are as follows:<\/p>\n<p>    * -z to tell tar to run this file through gzip to decompress (use -j for bzip files)<br \/>\n    * -x to extract the files<br \/>\n    * -v for \u201cverbose\u201d, so we can see a list of the files it\u2019s extracting<br \/>\n    * -f to tell tar that we\u2019re working with a file<\/p>\n<p>For easier unzipping, see the Tips section at the bottom of this page<br \/>\nConfigure<\/p>\n<p>Once the files are extracted, open a command terminal and go to the directory where the files have been unzipped. Before we can compile, we need to run the configure script. The job of the configure script is to check your system for all the software necessary to compile the program from source code into a usable binary program. It looks for things like gcc version and other tools needed to build the software. So once you\u2019re in the directory with all the files that were unpacked from the tarball, type in<\/p>\n<p>.\/configure<\/p>\n<p>If all goes well it\u2019ll go through a check of various parts of your system, then drop you back to the command line like below:<\/p>\n<p>Running the configure script<\/p>\n<p>The most common cause of errors in this step is a missing dependency. Look closely at any errors you may get to determine what package is missing.<br \/>\nMake<\/p>\n<p>This is the real meat of the process &#8211; where we compile the source code into a runnable program. This is normally the easiest step, only requiring a single command. If the configure step completed without errors, simply type in<\/p>\n<p>make<\/p>\n<p>On a large program, this step might take a few minutes. Once done, you\u2019ll be dropped back to the shell prompt as shown here.<\/p>\n<p>Compilation stage<\/p>\n<p>Technically, your program is now ready to use. Under most circumstances, however, you\u2019ll want to run one more step so that she program can be fully installed into the correct locations for it to be run from anywhere.<br \/>\nMake install<\/p>\n<p>All this really does is copy the now-compiled program into the system directories like \/usr\/bin so that it can be run from any directory without having to specify a path to the files. Since it\u2019s copying to a directory outside your home, you\u2019ll probably need root privileges. If the make step completed without errors, simply run<\/p>\n<p>sudo make install<\/p>\n<p>to copy the files. At this point, you\u2019re all done! Your new program can be used like any other.<br \/>\nTips<\/p>\n<p>Chances are, you\u2019ll be compiling from source more than once in your life. In fact, for those who like to use the latest and greatest software, this can be very common. To make it a little easier, open your .bashrc file from your home directory, and add the following aliases to the end:<\/p>\n<p>alias ungz=&#8221;tar -zxvf&#8221;<br \/>\nalias unbz=&#8221;tar -jxvf&#8221;<br \/>\nalias cmi=&#8221;.\/configure &#038;&#038; make &#038;&#038; sudo make install&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Posted June 25th, 2009 by Joshua Price in Linux Most of the time, installing software in Linux is a breeze. Package management utilities like Apt, Portage, and Yum have made software installation in Linux even easier than it is in Windows (in my opinion at least). If you know what you want, you simply tell&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Software from a Tarball in Linux - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Software from a Tarball in Linux - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Posted June 25th, 2009 by Joshua Price in Linux Most of the time, installing software in Linux is a breeze. Package management utilities like Apt, Portage, and Yum have made software installation in Linux even easier than it is in Windows (in my opinion at least). If you know what you want, you simply tell... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-26T04:29:14+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"How to Install Software from a Tarball in Linux\",\"datePublished\":\"2009-06-26T04:29:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/\"},\"wordCount\":843,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/\",\"name\":\"How to Install Software from a Tarball in Linux - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-06-26T04:29:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/how-to-install-software-from-a-tarball-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Software from a Tarball in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Software from a Tarball in Linux - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Software from a Tarball in Linux - Linux Shtuff","og_description":"Posted June 25th, 2009 by Joshua Price in Linux Most of the time, installing software in Linux is a breeze. Package management utilities like Apt, Portage, and Yum have made software installation in Linux even easier than it is in Windows (in my opinion at least). If you know what you want, you simply tell... Read More","og_url":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-06-26T04:29:14+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"How to Install Software from a Tarball in Linux","datePublished":"2009-06-26T04:29:14+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/"},"wordCount":843,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/","url":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/","name":"How to Install Software from a Tarball in Linux - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-06-26T04:29:14+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/how-to-install-software-from-a-tarball-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"How to Install Software from a Tarball in Linux"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}