How to install PECL on Ubuntu 21.04 with php8.0

pk flag

i have problems with the usage/installation of the pecl library.

Here is what i did:

echo "deb hirsute main" >
apt-get update
apt-get install php8.0-dev
apt-get install php-pear

using pecl gives me this error:

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/php/PEAR/Config.php on line 2095

It looks like i have an old php-pear version. Do have somebody an idea how to get a actual php-pear that is compatible with php8.0?

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute

I am very grateful for any help.

in flag

I had same problem, had to downgrade to 7.2 for cli.

Also, some people might find this post when trying to install mongodb extension for php8.0, there is an easier way if you run ubuntu:

sudo apt-get install php8.0-mongodb

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.