• 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

Issue php: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by php)

MaRe

New Pleskian
Hello all,

after updating my Plesk server from Ubuntu 16 -> Ubuntu 18 -> Ubuntu 20, I wanted to configure a specific PHP version for CLI on my server as described here: How to configure a specific command line PHP version for an SSH user on a Plesk for Linux server?

I wanted to use PHP 7.4 in CLI instead of 7.3 and did the steps as described. Then updated using update_chroot (How to add programs to a chrooted shell environment template in Plesk). That did work without any error, but when I type php -v I get the following errors:
Code:
bash-4.3$ pvp -v
/opt/plesk/php/7.4/bin/php: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /opt/plesk/php/7.4/bin/php)

So I reverted all changes using update_chroot --update, now I get the next error:

Code:
bash-4.3$ php -v
php: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by php)

Now no PHP works in chroot, as root user directly on the system it works, and there is PHP 7.2:

Code:
root@myserver:~# php -v
PHP 7.2.34 (cli) (built: Oct  2 2020 04:45:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

I don't know how to investigate this further. Any help is appreciated, thank you!
 
Just make sure /lib/x86_64-linux-gnu/libm.so.6 and /lib/x86_64-linux-gnu/libc.so.6 are up-to-date in your chroot environments.
 
Just make sure /lib/x86_64-linux-gnu/libm.so.6 and /lib/x86_64-linux-gnu/libc.so.6 are up-to-date in your chroot environments.
Thanks for your reply. Unfortunately, I don't know how to do this. Running apt update shows me no pending updates.
 
Oh, after a reboot there were some updates available. I did them and see now:

Code:
root@myserver:~# su user
-: relocation error: /lib/x86_64-linux-gnu/libnss_compat.so.2: symbol __nss_database_lookup2, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Entering the server now via SSH directly with "user" closes the SSH connection immediately, probably because of that error. Logging in with root works.
 
Back
Top