PHP Ldap integration

Hi, enable “LDAP user and group backend” is grayed out.
This app cannot be installed because the following dependencies are not fulfilled:

  • The library ldap is not available

Environment: Nextcloud 23.0.0 Installed on Ubuntu 20.04 LTS with MySQL.

I have installed php-ldap package and also activated the extension.
Output from php-m is:

[PHP Modules]
...
ldap

PHP version is 8.0.14. And PHP info shows also ldap

But it’s still not working. Any suggestions?