• 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 APCu for PHP 8.2

Kulturmensch

Regular Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.52_build1800230421.10 os_Ubuntu 20.04
Is there any instruction how to install APCu for PHP 8.2 ? For php 8.1 it is still working on my ubuntu server.
 
Hi scsa20, thank you for the quick answer. Unfortunately I did not succeed with this instruction. Look here to see my attempt

root@mail:/# apt install plesk-php82-dev zlib1g-dev gcc make
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
gcc ist schon die neueste Version (4:9.3.0-1ubuntu2).
make ist schon die neueste Version (4.2.1-1.2).
zlib1g-dev ist schon die neueste Version (1:1.2.11.dfsg-2ubuntu1.5).
plesk-php82-dev ist schon die neueste Version (8.2.5-ubuntu.20.04.230414.1904).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.

root@mail:/# /opt/plesk/php/8.2/bin/pecl install apcu
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-upd ate pecl.php.net" to update
downloading apcu-5.1.22.tgz ...
Starting to download apcu-5.1.22.tgz (93,926 bytes)
.....................done: 93,926 bytes
44 source files, building
running: phpize
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
/opt/plesk/php/8.2/bin/phpize: 154: /usr/bin/sed: not found
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
ERROR: `phpize' failed
root@mail:/# echo "extension=apcu.so" > /opt/plesk/php/8.2/etc/php.d/apcu.ini
root@mail:/# service plesk-php82-fpm restart
root@mail:/# plesk bin php_handler --reread
The information about PHP handlers was successfully updated.
root@mail:/# /opt/plesk/php/8.2/bin/php -i | grep apc.enabled
PHP Warning: PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /opt/plesk/php/8.2/lib/php/modules/apcu.so (/opt/plesk/php/8.2/lib/php/modules/apcu.so: cannot open shared object file: No such file or directory), /opt/plesk/php/8.2/lib/php/modules/apcu.so.so (/opt/plesk/php/8.2/lib/php/modules/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Any idea what went wrong?
 
So I spun up a ubuntu 20.04 instance and went through the steps line by line and had no issues. From the looks of it you might be missing /usr/bin/sed. You might want to make sure that file is there and if not tells me for whatever reason you do not have sed installed or is corrupted. You can fix that by doing apt install --reinstall sed to reinstall it. Once done you can continue starting at step 3.
 
root@mail:/# apt install --reinstall sed
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 2 nicht aktualisiert.
Es müssen 190 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Holen:1 http://ftp.stratoserver.net/pub/linux/ubuntu focal/main amd64 sed amd64 4.7-1 [190 kB]
Es wurden 190 kB in 0 s geholt (9.525 kB/s).
(Lese Datenbank ... 98843 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../archives/sed_4.7-1_amd64.deb ...
Entpacken von sed (4.7-1) über (4.7-1) ...
sed (4.7-1) wird eingerichtet ...
Trigger für install-info (6.7.0.dfsg.2-5) werden verarbeitet ...
Trigger für man-db (2.9.1-1) werden verarbeitet ...

Re-installation seems to be correct

But then again:

root@mail:/# /opt/plesk/php/8.2/bin/pecl install apcu
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading apcu-5.1.22.tgz ...
Starting to download apcu-5.1.22.tgz (93,926 bytes)
.....................done: 93,926 bytes
44 source files, building
running: phpize
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
/opt/plesk/php/8.2/bin/phpize: 1: /usr/bin/sed: not found
grep: Schreibfehler: Datenübergabe unterbrochen (broken pipe)
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
/opt/plesk/php/8.2/bin/phpize: 154: /usr/bin/sed: not found
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
ERROR: `phpize' failed

Do you have any further idea what I could do?
 
Did you checked to see if /usr/bin/sed exist? How about /opt/plesk/php/8.2/bin/phpize?
 
Can I remove sed completely using
sudo apt-get -y autoremove --purge sed

and re-install it to solve this problem?
 
So, eventually I got it work.
First: I repaired the missing sed
Did not work but
Second: ln -sf /bin/sed /usr/bin/sed did the trick.

Starting at this point with the installation worked following again the steps as provided by you.
Thank you for your help!
 
Back
Top