Wednesday, March 24, 2010

RPM: Replacing packages

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi

Replacing


If the same package and same version is already installed but want to install this package anyway, we can use --replacepkgs option. This will tell RPM to ignore the error:


# rpm -ivh --replacepkgs xmms-1.2.10-1.i386.rpm


Conflicting

If we are installing package which contains a file that has already been installed by another package, the following type of information is displayed:

Preparing…

######################################################[100%]

file /usr/bin/xmms from install of xmms-1.2.10-1 conflicts with file from xine-3.7.10

To make RPM ignore this error, use the --replacefiles option:

# rpm -ivh --replacefiles xmms-1.2.10-1.i386.rpm


If we have a required online source for RPM packages, we can install them directly from that source. For example, if we want to install the lynx RPM package from RedHat/RPMS directory on server named linuxserver71, We can run the following command to install it:


# rpm -ivh ftp://linuxserver71/RedHat/RPMS/lynx-*


Some other FTP servers require user name and password. For example following:


# rpm -ivh ftp://anonymousftp.redhat.com/pub/redhat/linux/rawhide/i386/RPMS/lynx-*


Password for anonymous@ftp.redhat.com:

The password that we enter is not displayed on the screen. We can use this command to install the newer version of many packages. But this command may not work well over internet. So for that situation download the package first and then install it.


Tuesday, March 23, 2010

Installing RPM

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi

Installing Package


Basic installation of new RPM package is very simple. Its syntax is rpm -i filename. For example:


Installing xmms mp3 player:


# rpm -ivh xmms-1.2.10-1.i386.rpm


# rpm -ivh xmms-mp3-1.2.10-1.1.fr.i386.rpm


Or, installing gxine media player:


# rpm -ivh libxine1-1_cvs-040627.i386.rpm


# rpm -ivh gxine-0.3.3-2.fr.i386.rpm


Here -v option is used for verbose and -h option for showing hashes. So we can monitor the progress of installation. The file name includes package name (xmms), version number (1.2.10), release (1), and architecture (i386). If installation is successful, the output is displayed as under:


Preparing…

######################################################[100%]

1:xmms ####################################################

[100%]


If the package is already installed, the following is displayed:


Preparing…

######################################################[100%]

Package xmms-1.2.10-1 is already installed


Note: mp3 player can be run using command xmms&, similarly video player can be run using gxine& command.


Monday, March 22, 2010

Querying RPM: contd...



Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi

Along with -q option we also can use package selection options too, which as follows:


· -a To query all the installed packages

· -i To display package information including size, name, build, date, release,

vendor, installed date and other information

· -f filename To query the package which owns file filename

· -l To display list of files which the package contains

· -d To display list of files marked as documentation

· -p package To query the package package


Following is the example of information query. It helps us get the summary information associated with setup RPM:




If we are not sure about the package, we can list the files in it by using rpm -ql package command, which is as follows: