ARCHIVED: In Unix, how do I install a program distributed in *.tar format?
A program that is in *.tar
format has been
archived using the Unix tar command. An archived
file is one file that contains many files. To install a program that
is in *.tar
format, you must first separate, or unpack,
the individual files. To do so, at the prompt, enter the following
command:
tar -xvf filename.tar
Replace filename
with the name of the program you are
installing.
In most cases this will create a directory called
filename
(the name of your program) which includes all of
the source files for the program. To go into this directory, enter
the following command, replacing filename
with the name
of your program directory:
cd filename
In many cases, files distributed in *.tar
format are
also compressed, in which case the files must first be decompressed.
For instructions, see the following:
- If your file contains a
.tar.gz
or.tgz
extension, see Use tar to combine multiple files into an archive file - If your file contains a
.tar.Z
extension, see About compressed files in Unix.
Most free Unix programs are distributed as source files. These are
text files containing the program file. In most cases you will need
to compile the program for the system on which you are installing the
program. Most free Unix programs will come with a text file called
README
or INSTALL
with specific
instructions. Usually you will need to complete the following steps:
- Configure the software: Some programs come with a
shell script called
configure
. This shell script will scan your computer to determine the location of files necessary for the program to work. If you are installing the program on a shared Unix system, you will want to install the files in your home directory. To do so, enter the following command:./configure --prefix=$HOME
For programs that don't have a
configure
script, you may need to edit a file called a Makefile in order to install the software. TheREADME
orINSTALL
file will explain how to do this. - Compile the program: Compiling the program
creates an executable file. To compile the program for most Unix
packages, from the program's directory, enter
make
. - Install the program: In some cases you may be
able to install the program in your home directory by entering the
command:
make install
For other packages you may need to move the executable files to your home directory. To do so, use the following command:
mv filename ~/bin
Replace
filename
with the name of the executable file you are moving.
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.
This is document ahey in the Knowledge Base.
Last modified on 2018-01-18 12:48:16.