1

i'm trying to install a trade extension module to php buy using:

pecl install trader

at the beginning of the installation i'm getting the some warnings such as:

Warning: Invalid argument supplied for foreach() in PEAR/Downloader.php on line 594

Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Downloader.php on line 594

But then installation is going forward, after a while i'm getting this error:

**#include "php.h"
         ^~~~~~~
1 error generated.
make: *** [functions/trader_acos.lo] Error 1
ERROR: `make' failed**

the version of the Pecl is:

PEAR Version: 1.10.12
PHP Version: 7.3.24-(to be removed in future macOS)
Zend Engine Version: 3.3.24

I tried also to turnaround the "m1 chip problem" by installing with like this>

arch -x86_64 sudo pecl install trader

but I get the same issue.

someone can tell me if this problem is related to the M1 chip or with the php version and how can I solve it?

thank you

Octapudus
  • 11
  • 1
  • I believe when compiling the extension it cannot locate the header files required, [this post might help](https://stackoverflow.com/questions/61399563/installation-of-xdebug-on-macos-for-phpstorm) – RJK Feb 04 '21 at 15:53
  • Hello! Did you found a solution? I'm facing same problem with any extension (even xdebug). Tried answer from comments – another problem but still doesn't work. – trogwar May 26 '21 at 12:23
  • No, I didn't have success, in the end, I installed Linux on my desktop computer, and used a VPS server (3 euros/month) to create a VPN tunnel between my M1 laptop and desktop computer. in the end it's the same and working well – Octapudus May 27 '21 at 23:14

0 Answers0