How to install xclock on Red Hat Linux

How to identify if xclock is installed and if it is not installed, how to install it.

If xclock is not installed, invoking xclock will return command not found message as seen below

$ xclock
-bash: xclock: command not found

whereis, which and rpm -qa commands confirm that xclock is not installed

$ whereis xclock
xclock:
$ which xclock
/usr/bin/which: no xclock in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

Use rpm -qa to find if the package xorg-x11-apps is installed.

# rpm -qa  | grep -i xorg-x11-apps
#

The above command returns nothing. Which means that there is no rpm for xclock installed on the system. -qa stands for query, all.

Installation of xorg-x11-apps Package

As a root user, install the package xorg-x11-apps-7.6-6.el6.x86_64.rpm

This package will be present in Packages directory of the installation media. Packages directory contains all rpms in Red Hat Linux distribution.

# pwd
/media/RHEL_6.5 x86_64 Disc 1/Packages

In the Packages directory, look for the rpm xorg-x11-apps-7.6-6.el6.x86_64.rpm. This rpm contains xclock

# ls -l xorg-x11-apps-7.6-6.el6.x86_64.rpm
-r--r--r--. 244 oracle oinstall 283020 Jan  8  2013 xorg-x11-apps-7.6-6.el6.x86_64.rpm

Just by installed xorg-x11-apps-7.6-6.el6.x86_64.rpm will return dependency errors

# rpm -Uvh xorg-x11-apps-7.6-6.el6.x86_64.rpm
warning: xorg-x11-apps-7.6-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        libXaw.so.7()(64bit) is needed by xorg-x11-apps-7.6-6.el6.x86_64
# ls -l libXaw*
-r--r--r--. 482 oracle oinstall 194824 Dec 21  2012 libXaw-1.0.11-2.el6.i686.rpm
-r--r--r--. 312 oracle oinstall 182380 Dec 21  2012 libXaw-1.0.11-2.el6.x86_64.rpm
-r--r--r--. 437 oracle oinstall 155564 Dec 21  2012 libXaw-devel-1.0.11-2.el6.i686.rpm
-r--r--r--. 268 oracle oinstall 155548 Dec 21  2012 libXaw-devel-1.0.11-2.el6.x86_64.rpm
# rpm -Uvh libXaw-1.0.11-2.el6.x86_64.rpm
warning: libXaw-1.0.11-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        libXpm.so.4()(64bit) is needed by libXaw-1.0.11-2.el6.x86_64
# ls -l libXpm*
-r--r--r--. 504 oracle oinstall 51540 Dec 21  2012 libXpm-3.5.10-2.el6.i686.rpm
-r--r--r--. 312 oracle oinstall 51912 Dec 21  2012 libXpm-3.5.10-2.el6.x86_64.rpm
-r--r--r--. 437 oracle oinstall 33336 Dec 21  2012 libXpm-devel-3.5.10-2.el6.i686.rpm
-r--r--r--. 268 oracle oinstall 34252 Dec 21  2012 libXpm-devel-3.5.10-2.el6.x86_64.rpm

To successfully install xorg-x11-apps-7.6-6.el6.x86_64.rpm, the following are the dependent rpms

# rpm -Uvh libXpm-3.5.10-2.el6.x86_64.rpm
warning: libXpm-3.5.10-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:libXpm                 ########################################### [100%]
#  rpm -Uvh libXaw-1.0.11-2.el6.x86_64.rpm
warning: libXaw-1.0.11-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:libXaw                 ########################################### [100%]

Finall install xorg-x11-apps-7.6-6.el6.x86_64.rpm

# rpm -Uvh xorg-x11-apps-7.6-6.el6.x86_64.rpm
warning: xorg-x11-apps-7.6-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:xorg-x11-apps          ########################################### [100%]
# whereis xclock
xclock: /usr/bin/xclock /usr/share/man/man1/xclock.1.gz
[root@rusticoem Packages]# which xclock
/usr/bin/xclock
Comments