Install extensions mongodb in php 7.4 failed with error symbol not found in flat namespace (_ZSTD_compress)

169 views Asked by At

When I try to install extension mongodb for php 7.4 I have an error in log and extension not work

This Error is: [06-Sep-2023 10:38:32 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so (dlopen(/Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so, 0x0009): symbol not found in flat namespace (_ZSTD_compress)), /Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so.so (dlopen(/Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so.so, 0x0009): tried: '/Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so.so' (no such file))) in Unknown on line 0

Command I used: pecl install mongodb it don't have any error when install and when I check pecl list it return Package Version State mongodb 1.16.2 stable

the file mongodb.so is created. And put exactly in /Applications/MAMP/bin/php/php7.4.33/lib/php/extensions/no-debug-non-zts-20190902/mongodb.so

But when I start server the extension not work and not show in phpinfo. I think I miss some dependencies or wrong when run build mongodb extension with pecl. Because I use another mac build it not have this problem.

Do you know what reason for this error ? I try with old version extension and another version but it still have error. Hope I find a answer.

I using MAMP macOS 12.6 M1 PHP 7.4.33 in MAMP

Know what wrong in here

0

There are 0 answers