MongoDB extesion not installing using sudo pecl install mongodb

89 Views Asked by At

I'm trying to install mongodb extenstion in MacOS (13.4.1) Chip (Apple M1 Pro) having Xampp installed with php verison PHP 7.4.1 using sudo pecl install mongodb but it's giving below error

fatal error: 'unicode/usprep.h' file not found
#include <unicode/usprep.h>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/libmongoc/src/libmongoc/src/mongoc/mongoc-scram.lo] Error 1
ERROR: `make' failed

I have tried install mongodb extension for xampp on macos but it's also not working.

which php gives /Applications/XAMPP/bin/php and which pecl gives /Applications/XAMPP/bin/pecl and which icuinfo gives /opt/homebrew/opt/icu4c/bin/icuinfo

I have below paths exported in bash profile

export PATH="/opt/homebrew/opt/icu4c/bin:$PATH"
export PATH="/opt/homebrew/opt/icu4c/sbin:$PATH"
0

There are 0 best solutions below