0

I have issue with installing "mysqlnd memcache" plugin (mysqlnd_memcache.so) to use with InnoDB Memcached Daemon (having its "/usr/lib/mysql/plugin/libmemcached.so") on Ubuntu (Bionic) 18.0.4.

The problem is that the official installation instruction for "mysqlnd memcache" plugin wants "include/libmemcached/memcached.h" to be contained by the directory where libmemcached.so is stored. (In addition to use --with-libmemcached-dir=(DIR for libmemcached.so), but that memcached.h is not available anywhere in ubuntu system

B) i also need help in understanding this line in official documentation "This (the directory of libmemcached.so) directory has to contain the include/libmemcached/memcached.h file. Official Documentation: https://www.php.net/manual/en/memcached.installation.php Main Link: https://www.php.net/manual/en/intro.mysqlnd-memcache.php

Fakhar Anwar
  • 295
  • 1
  • 3
  • 20
  • The line in the official documentation you point out only applied *If libmemcached is installed in a non-standard location*, if you have installed it using defaults, then it shouldn't apply. – Nigel Ren Feb 29 '20 at 08:58
  • @NigelRen yes but "InnoDB Memcached Daemon" (libmemcached.so) is stored in MySQL's plugin directory "/usr/lib/mysql/plugin/", by default. Anyways, i have tried both: sudo pecl install mysqlnd_memcache AND .. sudo pecl install mysqlnd_memcache --with-libmemcached-dir=usr/lib/mysql/plugin/ I get this error: checking for libmemcached location... configure: error: mysqlnd_memcached support requires libmemcached. Use --with-libmemcached-dir= to specify the prefix where libmemcached headers and library are located – Fakhar Anwar Feb 29 '20 at 09:41
  • Not sure of `--with-libmemcached-dir=usr/lib/mysql/plugin/`, you probably need a `/` before `usr` - `--with-libmemcached-dir=/usr/lib/mysql/plugin/` – Nigel Ren Feb 29 '20 at 09:47
  • @NigelRen I applied directory path the way you said, which means by prepending / before usr/.. but still i am getting same error: --- checking for libmemcached location... configure: error: mysqlnd_memcached support requires libmemcached. Use --with-libmemcached-dir= to specify the prefix where libmemcached headers and library are located ERROR: `/tmp/pear/temp/mysqlnd_memcache/configure --with-php-config=/usr/bin/php-config' failed – Fakhar Anwar Feb 29 '20 at 11:19
  • Have you installed libmemcached-dev as well, this has all the files you need for complication. – Nigel Ren Feb 29 '20 at 11:28
  • No i have not installed "libmemcached-dev" separately thinking that i already have a "libmemcached.so" installed as (alias to) "InnoDB Memcached" plug-in. And, thinking that if i will install "libmemcached-dev", my php-memcached may use this library instead of InnoDB's one (residing ni "/usr/lib/mysql/plugin/libmemcached.so"). I though ran following commands: --- /*Step 1*/ $ sudo apt-get install memcached /*Step 2*/ $ sudo apt-get install php-memcached /*Step 3*/ $ sudo /etc/init.d/apache2 restart – Fakhar Anwar Feb 29 '20 at 12:58
  • libmemcached-dev is just the files needed to compile it, it's not a library in itself, but needed when you want to compile other modules which rely on the definitions within libmemcached. – Nigel Ren Feb 29 '20 at 13:00
  • i have installed libmemcached-dev but now as i try installing mysqlnd_memcache plugin, i get several erros like: --- /tmp/pear/temp/mysqlnd_memcache/mysqlnd_memcache.c:1240:6: error: too many argum ents to function ‘zend_hash_find’ if (zend_hash_find(CG(class_table), "memcached", sizeof("memcached"), (void ** ) &memcached_ce)==FAILURE) { – Fakhar Anwar Feb 29 '20 at 17:05
  • Does this answer your question? [Trying to install innodb memcached plugin MySQL5.6.17 on ubuntu 14.04](https://stackoverflow.com/questions/24529340/trying-to-install-innodb-memcached-plugin-mysql5-6-17-on-ubuntu-14-04) – Channa Jun 08 '21 at 20:40

0 Answers0