No package php-pecl-memcached available.

I was trying to install memcached on a centos 6.6 machine but when I run yum install php php-pecl-memcached, I was getting the error “No package php-pecl-memcached available.” I resolved it using the following method:

  • Open yum.conf that might be available at /etc/yum.conf
  • Find the line starting with exclude=
  • Remove “php” from that line. As it is preventing any package to install that was starting with “php”
  • Save the file yum.conf.

Now run the following command again:

It was ok.