I can not install GRPC on Mac OS X Mojave
Asked Answered
B

1

6

I use the mac mojave and am trying to install the grpc:

sudo pecl install grpc

I use MAMP.

The triggered error is:

/ bin / sh /private/tmp/pear/install/pear-build-root9h4CAG/grpc-1.16.0/libtool --mode = compile cc -fvisibility = hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS = 0 -DNOMINMAX -DGRPC_ARES = O-1. -I / private / tmp / pear / install / grpc -DPHP_ATOM_INC -I / private / tmp / pear / install / pear-build-root9h4CAG / grpc-1.16.0 / include -I / private / tmp / pear / install / pear -build-root9h4CAG / grpc-1.16.0 / main -I / private / tmp / pear / install / grpc -I / usr / include / php -I / usr / include / php / main -I / usr / include / php / TSRM -I / usr / include / php / Zend -I / usr / include / php / ext -I / usr / include / php / ext / date / lib -I / private / tmp / pear / install / grpc / include -I / private / tmp / install / grpc / src / php / ext / grpc -I / private / tmp / pear / install / grpc / third_party / boringssl / include -I / private / tmp / pear / install / grpc / third_party / address_sorting / include -I / private / tmp / pear / install / grpc / third_party / nanopb -DHAVE_CONFIG_H -Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std = c11 -g -O2 -D PB_FIELD_32BIT = 1 -c / private / tmp / pear / install / grpc / src / php / ext / grpc / byte_buffer.c -o src / php / ext / grpc / byte_buffer.lo mkdir src / php / ext / grpc / .libs  cc -fvisibility = hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS = 0 -DNOMINMAX -DGRPC_ARES = 0 -I. -I / private / tmp / pear / install / grpc -DPHP_ATOM_INC -I / private / tmp / pear / install / pear-build-root9h4CAG / grpc-1.16.0 / include -I / private / tmp / pear / install / pear -build-root9h4CAG / grpc-1.16.0 / main -I / private / tmp / pear / install / grpc -I / usr / include / php -I / usr / include / php / main -I / usr / include / php / TSRM -I / usr / include / php / Zend -I / usr / include / php / ext -I / usr / include / php / ext / date / lib -I / private / tmp / pear / install / grpc / include -I / private / tmp / install / grpc / src / php / ext / grpc -I / private / tmp / pear / install / grpc / third_party / boringssl / include -I / private / tmp / pear / install / grpc / third_party / address_sorting / include -I / private / tmp / pear / install / grpc / third_party / nanopb -DHAVE_CONFIG_H -Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std = c11 -g -O2 -D PB_FIELD_32BIT = 1 -c /private/tmp/pear/install/grpc/src/php/ext/grpc/byte_buffer.c -fno-common -DPIC -or src / php / ext / grpc / .libs / byte_buffer.o /private/tmp/pear/grpc/src/php/ext/grpc/byte_buffer.c:19:10: fatal error: 'php.h' file not found #include <php.h>          ^ ~~~~~~ 1 error generated. make: *** [src / php / ext / grpc / byte_buffer.lo] Error 1 ERROR: `make 'failed

Can someone help me?

Bertrand answered 3/12, 2018 at 0:11 Comment(0)
A
3

You have to install (if you already didn't) the command line tools

xcode-select --install

And also add the headers (they are not added in Mojave)

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Credit to @donatJ - https://mcmap.net/q/121853/-unable-to-use-phpize-after-update-to-macos-mojave

Aerotherapeutics answered 1/5, 2019 at 11:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.