LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help:how to install .tar (https://www.linuxquestions.org/questions/linux-software-2/help-how-to-install-tar-615175/)

VINSTAR 01-21-2008 08:12 AM

help:how to install .tar
 
i am newbie to linux
i dont know how to install packages
with extension .tar
Anybody pls explain me the step by step instruction for installing

indienick 01-21-2008 08:17 AM

If the archive has a .tar extension, it's an uncompressed archive. You don't really install from the archive, per se; you would untar it and run the configure script within it, then "make" the source code:
Code:

#USING "foo-0.1" AS AN EXAMPLE
#IF .tar IS THE EXTENSION:

$ tar -xf foo-0.1.tar

#IF .tar.gz IS THE EXTENSION:

$ tar -zxf foo-0.1.tar.gz

#IF .tar.bz2 IS THE EXTENSION:

$ tar -jxf foo-0.1.tar.bz2

#ONCE THE ARCHIVE IS UNPACKED:

$ cd foo-0.1
$ ./configure
$ make
$ su -c 'make install'
Password: [type in root password here]

Note, when you are prompted for the root password, no characters will be echoed (printed) to the screen. :)

A nice tool you can use for installing stuff from packages (although the command line is still the preferred way) is Pacman

VINSTAR 01-21-2008 08:22 AM

does this works for any packages in any distro

titopoquito 01-21-2008 09:52 AM

Quote:

Originally Posted by VINSTAR (Post 3030167)
does this works for any packages in any distro

Absolutely no, although it will work in many cases. After untarring the source look at the README or INSTALL files that come with it (may have other names) or on the homepage of that app.

Apps that are written in python for example require usually other steps, but once again: First take a look at the source you downloaded, if there is some documentation.

Further more, sometimes "./configure" is not enough if you want to enable/disable special options of the software. "./configure --help" or the documentation usually give you info about that.

P.S.: Usually it's a good idea to use your distro's package manager to install packages. Most often there will be a precompiled package available (at least for Ubuntu, Suse, Debian ...) - compiling and installing from source is more a last way here, because your package management system usually doesn't know what you installed by hand and can do no dependency tracking this way.

VINSTAR 01-22-2008 01:07 AM

what is this python

Nylex 01-22-2008 01:19 AM

Python is a programming language.

indienick 01-22-2008 07:24 AM

The configure-make-install method works if when you unpackage the tar archive, and there is a "configure" script within it.

Just note, just because a program may "configure" without any problem, doesn't mean that "make" will necessarily work. This is where you may just want to resort to sticking to your distribution's package manager.

When titopoquito brought up the point about Python programs, he meant that not all programs kept within "tarchives" may not necessarily be written in a compiled language (ie. C, C++), but may be written in an interpreted language (ie. Python, Lisp) which would not allow for any compiling.

kingzog 01-23-2008 12:03 AM

Quote:

Originally Posted by VINSTAR (Post 3030167)
does this works for any packages in any distro

Works for most Tar files like others have said. Best practice would be to always run "tar xf" in a seperate directory for each tar file, and if you see a README file in the resulting set of files, read it before assuming other things.

Also keep an eye on the terminal while configure and make are running to make sure your program compiles without a hitch. Every now and again you'll probably need to get something else your program needs to run properly.

VINSTAR 01-27-2008 12:31 PM

Got this page by searching

http://www.linuxquestions.org/questi...ograms.-45094/

okos 01-27-2008 02:23 PM

There are several places you can find info on command line usage (the black box with words no graphical display).
I usually try to find the answer myself before posting a question.
In command line (Konsole) you can type man <command>. There is usually a great amount of details there and many times examples at the end of the instructions.
A list of commands can be found here http://www.ss64.com/bash/
There is also google and lq search.

Also as others have said, read the "less README" and/or "less INSTALL" very closely. The program could depend on other programs to run. If the author has focused on detail, there should be a list of dependencies in the README/INSTALL. Those programs will need to be installed first before installing the actual program you want. This can be quite a bit of trouble. Some dependencies rely on yet other dependencies.

And... as others have said. If you have such distros as ubuntu, debian, etc... It is much easier to use the package manager. You can install prepackaged programs. The package manager will take care of the dependencies for you.
okos

wookiesteve 08-06-2010 04:52 PM

The way I do it is in this link its a very good tutorial

wookiesteve 08-06-2010 04:52 PM

sorry left out link link to private forum removed


All times are GMT -5. The time now is 09:39 PM.