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

3
  • 5
    Yum will work on redhat, apt-get on Debian. Your question is confusing, are you sure that's correct? Commented Nov 27, 2013 at 13:17
  • I've CentOS, yum works there(sorry, apt-get command wont work there i guess) Commented Nov 28, 2013 at 10:43
  • You have "debian" in tags. Commented Jul 4, 2021 at 18:06

3 Answers 3

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 
2
  • 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. Commented Nov 28, 2013 at 10:41
  • Btw, i'm trying now using pecl, using command pecl install memcached, lets see how its come Commented Nov 28, 2013 at 11:29
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

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

1
  • 1
    Use of cPanel is not supported at this site. Commented Jun 19, 2020 at 14:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.