Reputation: 23
After getting my problem solved on this brilliant ansewer on how to get Pear running with success on Mac OS, I'm in trouble with the below errors while I'm trying to install and configure GRPC according to this google instruction
I understand that the problem is that the system is "Unable to load dynamic library 'grpc.so'"
Please can anybody give me a path on how to solve those issues or maybe show me what I'm doing wrong?
I'm running my localhost with PHP 8 served by MAMP
Thank you very much!!
composer require "grpc/grpc:^1.38"
PHP Warning: PHP Startup: Unable to load dynamic library 'grpc.so' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so), /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so)) in Unknown on line 0
Upvotes: 2
Views: 8672
Reputation: 85
In my case, I am using PHP 7.4 in MacOS. When I ran the
pecl install grpc
... command; it installed the .../20190902/grpc.so inside the current PHP version folder, so, I just copy-paste the grpc.so in the right path mentioned in console:
[email protected]/7.426_1/pecl/20190902/grpc.so --> /usr/local/lib/php/pecl/20190902/grpc.so
I hope this can be helpful to anybody!
Upvotes: 0
Reputation: 11
My solution is just create directory by run command
"mkdir /usr/local/lib/php/pecl"
Upvotes: 1