LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install files in Linux ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-files-in-linux-437251/)

Var2 04-20-2006 06:03 PM

How to install files in Linux ?
 
As u know freinds am newbie,am habibutal of windows so i thought istalling a app in linux will be as in windows but it not ,as got a .tar file when i clicked on it it opened and then i clicked on all file there but nithoing happened so how to insatll any thing in linux am a newbie so plz tell step by step as where to do and what to do ,i know that i have write rpm etc but don't where and how ????

manhinli 04-20-2006 06:14 PM

Hello Var2,

Well, to install 'an application' is to actually install a package.

To install a package, you will need to extract the tar (if needed) and then run the RPM from the location.

Or

Some require to go into the terminal and type in the three main commands:

- make clean
- make (package name)
- make install

You may also find that the package needs other packages, and that package needs other packages and that's what's called PACKAGE HELL - when a recurring list of packages needs to be installed.

Usually a readme file included in most packages tells of what packages that needs to be installed befor the installation.

I see that you are running Fedora Core 4. You can run what's call up2date or yum to get the latest packages before you install the package.

Well I hope my long reply helps,
manhinli

rkelsen 04-20-2006 06:15 PM

With Fedora, packages are managed by a tool called "rpm"

You should really only download rpm packages designed for Fedora Core 4 if you want things to work straight away.

Generally speaking, ".tar.gz" files contain source code which will need to be compiled before it will work.

What is it you are trying to install?

debasish_5849 04-20-2006 09:41 PM

Quote:

Originally Posted by manhinli
Hello Var2,

Well, to install 'an application' is to actually install a package.

To install a package, you will need to extract the tar (if needed) and then run the RPM from the location.

Or

Some require to go into the terminal and type in the three main commands:

- make clean
- make (package name)
- make install

You may also find that the package needs other packages, and that package needs other packages and that's what's called PACKAGE HELL - when a recurring list of packages needs to be installed.

Usually a readme file included in most packages tells of what packages that needs to be installed befor the installation.

I see that you are running Fedora Core 4. You can run what's call up2date or yum to get the latest packages before you install the package.

Well I hope my long reply helps,
manhinli

Oops! you forgot the ./configure. And make clean is not needed, cos if somebody is distributing it, it sould not contain any compiled file anyway. Here is what I use while I'm in the directory in which I extracted the files:
./configure
make [options given in the "Readme"]
make install

chrism01 04-20-2006 11:37 PM

Actually, use the 'yum' tool as root, it'll get the rpm AND all it's dependencies....

Var2 04-24-2006 02:17 PM

i got another file that has .rpm extension i have fedora 4 but when i click on it to install it gives an error and close the file then iam now cofused ,how to intall files in linux ????

demented_are_go 04-24-2006 02:58 PM

try having a look at this :
man rpm

it will give you a ton of information. With fedora you can use yum to install certain packages, you can install, for example, firefox by typing :
yum install firefox

to update :
yum update

etc, man yum gives you lots of info.

jschiwal 04-24-2006 03:06 PM

Var2, you need to be more explicit on what the program you are trying to install is. First, check in the Fedora installer whether the same program is available as a package. One way to install a downloaded RPM package is to use the rpm program in the shell.

You need to be the root user to install an rpm package, so you need to "su" to root, or use "sudo". Sudo is a program to run a single command as root. It, sudo, does need to be set up first to let you do it.

example installation of an rpm package using rpm:
su
<root password>
rpm -Uhv package-version.rpm

I prefer using the "U" option (update) rather than the one for install, in case the package is already installed.

If the program you downloaded ended with .gz, it may be a tarball, or it could be a compressed installation program. Firefox and java may be the latter, but the former is most common. Tar stands for "Tape Archive", and is similar to "zip" in that you can archive several files and directories into a single file. The .gz extension indicates that "gzip" was used to compress the archive.

  1. Download the program to a directory where you have full read/write/execute access. I created a subdirectory in my home directory called downloads that I use for this purpose.
  2. cd to the download directory
  3. Expand the tarball; e.g. "tar -xvzf package.gz". The "x" option expands the archive into a directory by the same name sans the extension.
  4. cd into the new directory. Example: cd package/
  5. List the contents of the directory; "ls". There probably is a "README" file and an "INSTALL" file, which may contain important instructions.
  6. If there is a file called "configure" this is script that examines your system and produces a custom "Makefile" for your particular system. It is sometimes a good idea to first run "./configure --help" to learn of any special options to the "configure" program which enables additional features.
  7. Now you can produce the Makefile I mentioned. Enter "./configure". If you noticed any options that you want to add, add them after the command.
  8. compile the program with "make".
  9. Now install the program with "make install"
  10. You are done, but sometimes you want to run a non-default target to produce print worthy documentation from the "info" source. This can sometimes be done with "make ps" or "make pdf" command. If the package installs documentation you can read with the "info" command, it probably has these targets.
  11. One of the targets will reverse the process and uninstall the program. "make uninstall". So you might want to keep this directory, or perhaps backup the original tarball so you can uninstall it later.

For a few files you download, you will end up with a single file, which is an installer program. This may be more like your experience installing some programs from windows. A tip off is when the extracted file ends with a .bin extension.
  1. Download the file to your download directory.
  2. Extract the file: "tar -xvzf filename.gz"
  3. The extracted file looks like "filename.bin", so the next step is to make the file executable. "chmod +x filename"
  4. Run the installation program: "./filename.bin

If the package you downloaded ends with a .tgz extension, it may have been packaged for Slackware. It would be best if you went back to the web site and downloaded the correct version.

Also, you may want to search for the same program on the http://rpm.pbone.net web site. You can narrow your search for your particular distribution version. This site has a handy feature where it can check for any needed dependencies, and will provide links where you can get them.

If the file you downloaded ends with the .bz extension instead, it used a different compression program "bzip". To uncompress this archive use "tar -xvjf filename.bz" instead.

notes:
When using the tar command, the -f option needs to be listed last. It has a mandatory argument of the filename. Also, the tar command was initially written before the convention of using a dash before options, so the dash is optional.
"tar xvzf filename.gz" would also work.

You may have noticed that the "./configure" program starts with "./" while "make install" doesn't. The make command is a program that already exists on your system. The "./" characters is how you run a program in the current directory.

An alternative means of starting a "filename.bin" type installation program is to run "sh ./filename.bin". You don't need to make the file executable first with "chmod +x filename.bin". Suppose that an installation program is on a CDROM disc. You would run it this way because you can't use "chmod" on a file that is on a read-only disc.

pixellany 04-24-2006 03:38 PM

To summarize what I believe is already covered here....The options for installing SW--in order of preference:

1. Use the package manager in the GUI to install "official" packages

2. Get packages in *.rpm format and install using "rpm" in a terminal. "man rpm" for details.

3. Get a file (often *.tar.gz) which is first unpacked into folder. Then run an install script found in that folder.

4. Same as #3, but **compile** what is found in the folder.

Suggest you get comfortable with #1 first, then be sure you are comfortable with command-line (in a terminal). Then go on to the harder stuff


All times are GMT -5. The time now is 09:48 AM.