生成1个错误。 make:*** [php_intl.lo]错误1错误:`make'失败

问题描述 投票:0回答:1

我在我的macbook pro上安装了php 7.3.4,并且我正在尝试启用一个作者需要(intl)的php扩展。我已经在php.ini中启用了扩展intl,我收到了一条错误消息,说它无法找到 - 所以我假设这意味着我需要安装它。我在网上找到了关于如何安装扩展的教程(链接在底部),我遵循了这一点。在我运行sudo pecl install intl的阶段,我收到一个错误; make:*** [php_intl.lo]错误1错误:`make'失败

有没有人有办法解决吗?

Jamess-MBP:~ work$ sudo pecl install intl
Password: .........
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20180731/intl (dlopen(/usr/local/lib/php/pecl/20180731/intl, 9): image not found), /usr/local/lib/php/pecl/20180731/intl.so (dlopen(/usr/local/lib/php/pecl/20180731/intl.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20180731/intl (dlopen(/usr/local/lib/php/pecl/20180731/intl, 9): image not found), /usr/local/lib/php/pecl/20180731/intl.so (dlopen(/usr/local/lib/php/pecl/20180731/intl.so, 9): image not found)) in Unknown on line 0
downloading intl-3.0.0.tgz ...
Starting to download intl-3.0.0.tgz (248,200 bytes)
....................................................done: 248,200 bytes
150 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
Specify where ICU libraries and headers can be found [DEFAULT] : /usr/local/Cellar/icu4c/63.1/
building in /private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0
running: /private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/Cellar/php/7.3.4/bin/php-config --with-icu-dir=/usr/local/Cellar/icu4c/63.1/
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking for PHP prefix... /usr/local/Cellar/php/7.3.4
checking for PHP includes... -I/usr/local/Cellar/php/7.3.4/include/php -I/usr/local/Cellar/php/7.3.4/include/php/main -I/usr/local/Cellar/php/7.3.4/include/php/TSRM -I/usr/local/Cellar/php/7.3.4/include/php/Zend -I/usr/local/Cellar/php/7.3.4/include/php/ext -I/usr/local/Cellar/php/7.3.4/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php/7.3.4/pecl/20180731
checking for PHP installed headers prefix... /usr/local/Cellar/php/7.3.4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable internationalization support... yes, shared
checking for location of ICU headers and libraries... checking for pkg-config... /usr/local/bin/pkg-config
/usr/local/Cellar/icu4c/63.1
checking for ICU 4.0 or greater... found 63.1
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0/libtool --mode=compile cc -I/usr/local/Cellar/icu4c/63.1/include  -Wno-write-strings -I. -I/private/tmp/pear/temp/intl -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0/include -I/private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0/main -I/private/tmp/pear/temp/intl -I/usr/local/Cellar/php/7.3.4/include/php -I/usr/local/Cellar/php/7.3.4/include/php/main -I/usr/local/Cellar/php/7.3.4/include/php/TSRM -I/usr/local/Cellar/php/7.3.4/include/php/Zend -I/usr/local/Cellar/php/7.3.4/include/php/ext -I/usr/local/Cellar/php/7.3.4/include/php/ext/date/lib -I/usr/local/Cellar/icu4c/63.1/include  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/intl/php_intl.c -o php_intl.lo
mkdir .libs
 cc -I/usr/local/Cellar/icu4c/63.1/include -Wno-write-strings -I. -I/private/tmp/pear/temp/intl -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0/include -I/private/tmp/pear/temp/pear-build-rootf9ZgsV/intl-3.0.0/main -I/private/tmp/pear/temp/intl -I/usr/local/Cellar/php/7.3.4/include/php -I/usr/local/Cellar/php/7.3.4/include/php/main -I/usr/local/Cellar/php/7.3.4/include/php/TSRM -I/usr/local/Cellar/php/7.3.4/include/php/Zend -I/usr/local/Cellar/php/7.3.4/include/php/ext -I/usr/local/Cellar/php/7.3.4/include/php/ext/date/lib -I/usr/local/Cellar/icu4c/63.1/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/intl/php_intl.c  -fno-common -DPIC -o .libs/php_intl.o
In file included from /private/tmp/pear/temp/intl/php_intl.c:25:
In file included from /private/tmp/pear/temp/intl/php_intl.h:34:
/private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
#include <ext/standard/php_smart_str.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed

我按照在线教程进入这个阶段,这是http://budiirawan.com/install-php-intl-extension-os-x/

macos homebrew pecl intl
1个回答
0
投票

我已经通过使用macports而不是pecl安装扩展来解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.