在Mac上编译PHP
我正试图在Mac上编译PHP,但在最后一步中出现了所有这些错误在Mac上编译PHP,php,macos,Php,Macos,我正试图在Mac上编译PHP,但在最后一步中出现了所有这些错误 clang: error: no such file or directory: 'ext/date/php_date.o' clang: error: no such file or directory: 'ext/date/lib/astro.o' clang: error: no such file or directory: 'ext/date/lib/dow.o' ... 我在那些目录中看到了*.lo文件,它期望*.o。
clang: error: no such file or directory: 'ext/date/php_date.o'
clang: error: no such file or directory: 'ext/date/lib/astro.o'
clang: error: no such file or directory: 'ext/date/lib/dow.o'
...
我在那些目录中看到了*.lo文件,它期望*.o。您应该做的第一件事是从安装HomeBrew。然后从家用Brew安装php54。这将立即为您设置它。请告诉我们您在构建它时使用了哪些命令……尝试使用gcc llvm进行编译。我只是在运行“make”。@cleong我该怎么做?附加“CC=gcc”在configure命令行的末尾,我正在尝试创建一个PHP扩展,因此我需要从源代码处编译以生成扩展。@BerryBlue您确定这些文件在那里吗?还可以尝试“cc=gcc”,编译扩展不需要编译php,任何方式homebrew都是从源代码编译的,而不是二进制发行版。您可以使用php的homebrew安装启用/配置选项,例如--enable debug和--enable mainter zts吗?