Click to See Complete Forum and Search --> : how to install rpm package


Zaka
10-23-2007, 12:48 AM
hi bro,
i'm newbie in Linux.
How to install rpm package in PClinuxOs?
step by step.
thanks:)

leonpmu
10-23-2007, 01:19 AM
You have 2 ways in PCLinuxOS, one is through synaptics, the package manager, or from the command line in the console. If you want to do it with synaptics, you can right click on the icon of the rpm and click, install... if you want to do itform the command line then open the console, type : su - [enter] and then entrer the root password.
You will now get a prompt like this:
[hostname]#_ now to go to the directory that you ant to be in, type cd /path/to/directory [enter]
eg if it is in your home directory type cd /home/[username] [enter]
then type rpm -Uvh [ilename].rpm

That's it.

Hope it helps

Zaka
10-23-2007, 02:46 AM
thanks bro..
i will try:)

i845_
10-23-2007, 03:24 AM
@Zaka:

Hi and a warm welcome to the JustLinux forums.

The rpm command, like most other Linux commands, takes in a number of options, and a filename (in this case, a package to be acted upon), and then, performs modifications as directed by the options specified. The general form of the command is:

rpm <options> <packagename>

Note that rpm commands need to be executed as root, since they directly modify the system.

----------------------------------------

Using the rpm command, you may perform the following operations:

Install

This operation installs a package for the first time. To tell rpm to perform an install operation, you need to pass the -i or --install option to rpm. e.g. Issuing

rpm -i easytag-1.99.12-1.i386.rpm or rpm --install easytag-1.99.12-1.i386.rpm

as root installs the package 'easytag-1.99.12-1'.

Freshen

A freshen operation installs a new version of a package only if you have already installed another (older) version of the package. To tell rpm to perform a freshen operation, you need to pass the -F or --freshen option to rpm. e.g. Issuing

rpm -F easytag-1.99.12-1.i386.rpm or rpm --freshen easytag-1.99.12-1.i386.rpm

as root will cause rpm to first search the system for an existing (older) version of 'easytag'. If it finds one, it will proceed to replace that with the newer version, else, it will quit.

Upgrade

An upgrade operation installs a new version of a package and removes all previous versions of the same package. If you have not installed the package previously, the upgrade operation will install it. To tell rpm to perform an upgrade operation, you need to pass the -U or --upgrade option to rpm. e.g. Issuing

rpm -U easytag-1.99.12-1.i386.rpm or rpm --upgrade easytag-1.99.12-1.i386.rpm

as root will cause rpm to remove any existing installation of easytag, and install easytag-1.99.12-1. If no previous installation of easytag is detected, rpm installs the package anyway. For all package installations, upgrade is the operation that you'll want to perform in the vast majority of cases.

Query

The query operation helps you find out whether a package is installed on your system or not. To tell rpm to perform a query operation, you need to pass the -q or --query option to rpm. e.g. Issuing

rpm -q easytag or rpm --query easytag

as root will cause rpm to inform you whether the package 'easytag' is installed on your system or not.

Erase

An erase operation removes a previously installed package. If other packages depend on the package you're trying to remove, rpm shall inform you of the same. To tell rpm to perform an erase operation, you need to pass the -e or --erase option to rpm. e.g. Issuing

rpm -e easytag or rpm --erase easytag

as root will cause rpm to remove the package 'easytag' from the system.

----------------------------------------

During install operations, rpm silently performs the tasks assigned to it, and returns you to the shell prompt. By including certain extra options in the commandline, you can make rpm present you feedback relating to the installation operation.

The -v or --verbose option, when passed to rpm, makes it report (verbosely), every step that it has gone through. Another option, -h or --hash, prints out # marks to represent the progress of the install operation. This helps one understand that rpm is still running, and is especially important in the case of large packages, which might take quite a while to install.

Combining these options with -i, -F or -U, we have

rpm -ivh <package-name>
rpm -Fvh <package-name>
rpm -Uvh <package-name>

If you prefer the long options, we'll have

rpm --install --verbose --hash <package-name>
rpm --freshen --verbose --hash <package-name>
rpm --upgrade --verbose --hash <package-name>

----------------------------------------

Here's a sample of the output produced by rpm, while installing a package:

[see attachment below]

----------------------------------------


Here's a quick recap of rpm's various options:

To perform the install operation, use -i or --install.
To perform the freshen operation, use -F or --freshen.
To perform the update operation, use -U or --update.
To perform the query operation, use -q or --query.
To perform the erase operation, use -e or --erase.

----------------------------------------

Hope that helps.

----------------------------------------

/* Looks like I was a little late... ;-) */

saikee
10-23-2007, 03:27 AM
I prefer doing it with the terminal.

The skill becomes universal on any distro that uses rpm.

The Red Hat family use "yum" while the Debian family has "apt-get" instead of the "rpm" which I associate with the Mandrake family.