Skip to content
Advertisement

Tag: yum

Checking for installed packages and if not found install

I need to check for installed packages and if not installed install them. Example for RHEL, CentOS, Fedora: How do I do a check in BASH? Do I do something like? And what do I need to use for other distributions? apt-get? Answer Try the following code : or shorter : For debian likes : For archlinux :

yum install php-pear* on centos

I’m trying to install pear on my centos. I’ve used “*yum install php-pear**” to install pear and it seemed to install with success. No errors. I restart my server. However when I check out phpinfo(). I see that my php is still built using “–without-pear”. Isn’t yum supposed to rebuild my php with pear? What would be possibly going wrong?

Advertisement