• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved How to install APC/APCu extension for PHP 7.4.x with Ubuntu 20.4.1 LTS

Automata

Basic Pleskian
Hi,

Operating system:
Ubuntu 20.04.1 LTS

Plesk version:
Plesk Obsidian v18.0.29_build1800200731.19


I have already googled and tried all the existing guides but unfortunately none seem to work.

So i kindly ask for help on how to install APC/APCu extension for PHP 7.4.x with Ubuntu 20.4.1 LTS on Plesk Obsidian v18.0.29_build1800200731.19

I would like to thank in advance anyone who wants or can help me now.
 
Hello,

The instruction from KB article should help. In short: apt install plesk-php74-dev build-essential, then /opt/plesk/php7.4/bin/pecl install apcu, then configure ini for it. Please note, that APC pecl extension probably will not compile for PHP 7.4.
 
Hi,

Someone from the Plesk Team can kindly confirm if it is possible to install APC / APCu extension for PHP 7.4.x with Ubuntu 20.4.1 LTS ?

Thanks in advance for the support.
 
Someone from the Plesk Team can kindly confirm if it is possible to install APC / APCu extension for PHP 7.4.x with Ubuntu 20.4.1 LTS ?

Works on my test instance:
root@a10-52-35-5:~# plesk version
Product version: Plesk Obsidian 18.0.30.0
OS version: Ubuntu 20.04 x86_64
Build date: 2020/08/21 11:00
Revision: cfc10c8ba14662258dbd09badaaa44e8db9b1c97
root@a10-52-35-5:~# /opt/plesk/php/7.4/bin/php -m | grep -i apc
apcu
 
Hi dear "mizar" and "IgorG",

Yes, thanks to your help I was able to install and run APC / APCU.

Thanks again for your help.
 
May not for Ubuntu but for CentOS-Users interesting:

For example php.7.4:

Install Plesk PHP 7.4 development package:
yum install plesk-php74-devel zlib-devel gcc
Install APCu module:
/opt/plesk/php/7.4/bin/pecl install apcu
Enable APCu in PHP configuration:
echo "extension=apcu.so" > /opt/plesk/php/7.4/etc/php.d/apcu.ini
Restart PHP service and refresh PHP handlers information:
service plesk-php74-fpm restart
plesk bin php_handler --reread
Verify that the module is loaded and is working:
/opt/plesk/php/7.4/bin/php -i | grep apc.enabled
21:35:18][root@server:~]$/opt/plesk/php/7.4/bin/php -i | grep apc.enabled
apc.enabled => On => On

 
Last edited:
I installed different packages, but still get this error.
Any idea what the problem could be? Used this tutorial APCu-Extension für Plesk PHP 8

Bash:
➜ /opt/plesk/php/8.0/bin/pecl install apcu
downloading apcu-5.1.21.tgz ...
Starting to download apcu-5.1.21.tgz (92,516 bytes)
.....................done: 92,516 bytes
42 source files, building
running: phpize
/opt/plesk/php/8.0/bin/phpize: 1: /opt/plesk/php/8.0/bin/phpize: /usr/bin/sed: not found
grep: write error: Broken pipe
/opt/plesk/php/8.0/bin/phpize: 1: /opt/plesk/php/8.0/bin/phpize: /usr/bin/sed: not found
grep: write error: Broken pipe
/opt/plesk/php/8.0/bin/phpize: 1: /opt/plesk/php/8.0/bin/phpize: /usr/bin/sed: not found
grep: write error: Broken pipe
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
/opt/plesk/php/8.0/bin/phpize: 154: /opt/plesk/php/8.0/bin/phpize: /usr/bin/sed: not found
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
ERROR: `phpize' failed
 
@bendim what is your OS? Try to reinstall sed package with yum or apt depending on your OS, or just try to create symlink /usr/bin/sed
 
I symlink SED. Here is how and hope it helps other.

Bash:
ln /bin/sed /usr/bin/sed
That's a hardlink. It requires link and target to be in the same filesystem and does not need the target to resolve afterwards. This could lead to problems later e.g. if there is an update of /bin/sed, as removing /bin/sed will not affect /usr/bin/sed, which will still be the old version.
To symlink:
Bash:
ln -s /bin/sed /usr/bin/sed
or, as I prefer (verbose and prompt before overwrite),
Bash:
ln -svi /bin/sed /usr/bin/sed
 
Back
Top