0

I have try to connect my Codeigniter 4 with MongoDB using PHP_Mongo driver. In my PC separate apache2 server and XAMPP php also running. Both PHP versions are different. In my XAMPP using PHP8.1 and apache2 using PHP 7.4 . Whenever I try to install mongodb using the following command "pecl install mongodb " I got this error.

sh: 1: phpize: not found ERROR: `phpize' failed

In my /opt/lampp/lampp/bin/ there is a file named phpize.1 has present. But i don't what have do done. If any one knows the solution kindly help me.

  • 2
    Does this answer your question? [How to install and run phpize](https://stackoverflow.com/questions/3108937/how-to-install-and-run-phpize) – steven7mwesigwa Jul 30 '22 at 21:04

1 Answers1

0

You didn't tell us the operating system you were using, I assume you are using Debian or Ubuntu linux distro, you need to install the dev package.

For PHP 7.4

sudo apt install php7.4-dev

For PHP 8.1

sudo apt install php8.1-dev
Remo Harsono
  • 469
  • 9
  • 15