• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Plesk Onyx can´t install memcached

teamsundk

New Pleskian
hey i try to install memcached on plesk onyx ubuntu 16.04 (nginx,php5.6 fpm) but this error comes!


/opt/plesk/php/5.6/bin/pecl install memcached
pecl/memcached requires PHP (version >= 7.0.0), installed version is 5.6.30
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
No valid packages found
install failed

can anyone help me?
 
pecl/memcached requires PHP (version >= 7.0.0), installed version is 5.6.30
Use memcached for PHP version 7.0 or 7.1:

# /opt/plesk/php/7.0/bin/pecl install memcached

or

# /opt/plesk/php/7.1/bin/pecl install memcached
 
Hi teamsundk,

you might be interested in the facts:

Dependencies
php-memcached 3.x:
  • Supports PHP 7.0 - 7.1.
  • Requires libmemcached 1.x or higher.
  • Optionally supports igbinary 2.0 or higher.
  • Optionally supports msgpack 2.0 or higher.
php-memcached 2.x:
  • Supports PHP 5.2 - 5.6.
  • Requires libmemcached 0.44 or higher.
  • Optionally supports igbinary 1.0 or higher.
  • Optionally supports msgpack 0.5 or higher.



To install "memcached" for PHP 5.6, without choosing the latest release, you have to define the complete version, as for example:
Code:
/opt/plesk/php/5.6/bin/pecl install memcached-2.2.0


Additional note:

Pls. consider to view the descriptions and linked documentations for PECL extensions, by visiting for example:


"memcached" - example-link: => https://pecl.php.net/package/memcached
 
it doesn't work on Ubuntu 16, even with PHP7.1

OS ‪Ubuntu 16.04.2 LTS‬
Product Plesk Onyx
Version 17.5.3 Update #12, last updated on July 4, 2017 01:32 PM
The system is up-to-date. Checked on July 9, 2017 01:28 AM.

Code:
root@my-server-name:~# /opt/plesk/php/7.1/bin/pecl install memcached
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
downloading memcached-3.0.3.tgz ...
Starting to download memcached-3.0.3.tgz (77,310 bytes)
.................done: 77,310 bytes
15 source files, building
running: phpize
sh: 1: phpize: not found
ERROR: `phpize' failed
 
hello Igor, I have followed this tutorial: How to improve WordPress site speed with Memcached

but there are issues with Ubuntu

Code:
root@lmy-server-name:/opt/plesk/php/7.1# apt-get install make plesk-php71-dev gcc glibc-devel libmemcached-devel zlib-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glibc-devel
E: Unable to locate package libmemcached-devel
E: Unable to locate package zlib-devel
root@lvps83-169-21-210:/opt/plesk/php/7.1#
 
but there are issues with Ubuntu
The problem in that names of the same packages are different for CentOS and Ubuntu. So, you shouldn't use CentOS packages names for Ubuntu and vice versa. I'm not Ubuntu expert but as far as I remember names should be like glibc-dev libmemcached-dev zlib-dev. So, try to find correct names of these packages.
 
hello Igor, I have followed this tutorial: How to improve WordPress site speed with Memcached

but there are issues with Ubuntu

Code:
root@lmy-server-name:/opt/plesk/php/7.1# apt-get install make plesk-php71-dev gcc glibc-devel libmemcached-devel zlib-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glibc-devel
E: Unable to locate package libmemcached-devel
E: Unable to locate package zlib-devel
root@lvps83-169-21-210:/opt/plesk/php/7.1#
For debian/ubuntu packages needed are :
Code:
apt-get update && apt-get install gcc make autoconf libc-dev pkg-config plesk-php71-dev zlib1g-dev libmemcached-dev

Code:
cd /opt/plesk/php/7.1/include/php/ext
wget -O phpmemcached-php7.zip https://github.com/php-memcached-dev/php-memcached/archive/php7.zip
unzip phpmemcached-php7.zip
cd php-memcached-php7/
/opt/plesk/php/7.1/bin/phpize
./configure --with-php-config=/opt/plesk/php/7.1/bin/php-config
export CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
make
make install

Then add memcached module in plesk :
Code:
ls -la /opt/plesk/php/7.1/lib/php/modules/
echo "extension=memcached.so" >/opt/plesk/php/7.1/etc/php.d/memcached.ini
/usr/local/psa/bin/php_handler --reread
service plesk-php71-fpm restart
 
Back
Top