0

I've installed memcached server using yum. My server os info -

Linux version 3.8.4-x86_64-linode31 (maker@build) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Mon Mar 25 16:00:34 EDT 2013

But when i try to install php5-memcached using yum, it says - No package php5-memcached available.

Then i've tried using apt-get, but it says, apt-get command not found sudo: apt-get: command not found

Now, how can i install php5-memcached in my server?

Thanks

codegeek
  • 131
  • 1
  • 2
  • 9

3 Answers3

1

If you are using RHEL or CentOS, you need to have the EPEL repository enabled. When it is enabled you can install the php memcached package with the following command

yum install php-pecl-memcached
pkhamre
  • 6,120
  • 3
  • 17
  • 27
  • I've CentOS, tried your command but it says `Failed to set locale, defaulting to C Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.atlanticmetro.net * extras: mirror.atlanticmetro.net * updates: mirror.atlanticmetro.net Setting up Install Process No package php-pecl-memcached available.` but if i try php-pecl-memcache, that is available. – codegeek Nov 28 '13 at 10:41
  • Btw, i'm trying now using pecl, using command `pecl install memcached`, lets see how its come – codegeek Nov 28 '13 at 11:29
0
  1. search package

$ sudo yum search memcached

ea-php70-php-memcached.x86_64 : php-memcached extension for ea-php70
ea-php70-php-memcached-debuginfo.x86_64 : Debug information for package ea-php70-php-memcached
ea-php71-php-memcached.x86_64 : php-memcached extension for ea-php71
ea-php71-php-memcached-debuginfo.x86_64 : Debug information for package ea-php71-php-memcached
ea-php72-php-memcached.x86_64 : php-memcached extension for ea-php72
ea-php72-php-memcached-debuginfo.x86_64 : Debug information for package ea-php72-php-memcached
...............................
  1. install according to your PHP version , I have php 7.2, so I chose

$ sudo yum install ea-php72-php-memcached

and all done!

Hope this helps

0

If you are on Debian then check if /usr/bin is in your path by doing echo $PATH. If not you can fix you path or run apt-get directly by specifying the full path /usr/bin/apt-get php5-memcached

Sameer
  • 4,118
  • 2
  • 17
  • 11