How to check if a particular linux package is installed, and install it if its not installed.
Check is a package is installed:
Use the command: rpm -qa package_name*
[root@kundun ~]# rpm -qa libstd*
libstdc++-4.1.2-14.el5
libstdc++-devel-4.1.2-14.el5
To install the package use the command: rpm -Uvh package_name
[root@kundun ~]# rpm -Uvh unixODBC-devel-2.2.11-7.1.i386.rpm
Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:unixODBC-devel ########################################### [100%]
And to remove a package: rpm -e package_name
[root@kundun ~] rpm -e oracleasm-support-2.0.4-1.el5.i386.rpm
******************************
keywords: rpm package
******************************
No comments:
Post a Comment