Score:0

Error Installing Memcached with Plesk Ubuntu Server

br flag

We are working on getting a new Ubuntu Plesk server running with memcached and keep running into errors when setting it up for PHP.

Using the instructions from Plesk we run the following successfully:

apt install memcached autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php*-dev zlib1g-dev make

But we run into an issue once we try to install the PHP extension (in our case for PHP 8.1)

/opt/plesk/php/8.1/bin/pecl install memcached

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
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.2.0.tgz ...
Starting to download memcached-3.2.0.tgz (90,722 bytes)
.....................done: 90,722 bytes
18 source files, building
running: phpize
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902
configure.ac:18: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
build/php.m4:2111: PHP_CONFIG_NICE is expanded from...
configure.ac:18: the top level
configure.ac:161: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:161: You should run autoupdate.
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
libmemcached directory [no] : 
zlib directory [no] : 
use system fastlz [no] : 
enable igbinary serializer [no] : 
enable msgpack serializer [no] : 
enable json serializer [no] : 
enable server protocol [no] : 
enable sasl [yes] : 
enable sessions [yes] : 
building in /tmp/pear-build-rootFGnoXE/memcached-3.2.0
running: /tmp/memcached/configure --with-php-config=/opt/plesk/php/8.1/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /opt/plesk/php/8.1
checking for PHP includes... -I/opt/plesk/php/8.1/include/php -I/opt/plesk/php/8.1/include/php/main -I/opt/plesk/php/8.1/include/php/TSRM -I/opt/plesk/php/8.1/include/php/Zend -I/opt/plesk/php/8.1/include/php/ext -I/opt/plesk/php/8.1/include/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/8.1/lib/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/8.1/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking whether to use system FastLZ library... no
checking for ZLIB... yes, shared
checking for pkg-config... /usr/bin/pkg-config
checking for zlib location... /usr
checking for session includes... /opt/plesk/php/8.1/include/php
checking for memcached session support... enabled
checking for memcached igbinary support... disabled
checking for memcached msgpack support... disabled
checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/tmp/memcached/configure --with-php-config=/opt/plesk/php/8.1/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes' failed

I noticed it referenced an error with the pecl channel at the beginning so I ran:

pecl channel-update pecl.php.net

But after the result was the same.

Ubuntu 22.04.3 LTS

Plesk Obsidian 18.0.54

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.