FIX: Vagrant php-memcached error

Datetime:2016-08-23 01:29:12          Topic: Memcached  PHP           Share

I normally use PuPHPet to configure my Vagrant boxes.On my latest box using CentOS 5.6 the setup worked normally, but when trying to run my application I was getting the Class ‘Memcache’ not found error.

Usually this is a simple fix, just go in and type:

sudo yum install -y php-memcached

However, this time round the above was giving me the following error:

Transaction Check Error:<br /> file /usr/lib64/libhashkit.so.2.0.0 conflicts between attempted installs of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 and libmemcached10-1.0.16-1.ius.centos6.x86_64<br /> file /usr/lib64/libmemcached.so.11.0.0 conflicts between attempted installs of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 and libmemcached10-1.0.16-1.ius.centos6.x86_64<br /> file /usr/lib64/libmemcachedutil.so.2.0.0 conflicts between attempted installs of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 and libmemcached10-1.0.16-1.ius.centos6.x86_64

After smashing my head against the desk a few times during numerous attempts at installing the module, reprovisioning the vagrant box and anything else I could think of doing to fix it, I tried something that hadn’t occurred to me before; to install the dependency it was complaining about first.

Using the following commands fixed my issue, and should also work for you:


sudo yum install -y libmemcached-last
sudo yum install -y php-memcached
sudo service php-fpm restart

Hope this helps!





About List