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

2024-01-09

我在我的 macbook pro 上安装了 php 7.3.4,我正在尝试启用作曲家需要的 php 扩展(intl)。我在 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/ http://budiirawan.com/install-php-intl-extension-os-x/


请遵循以下流程(从https://medium.com/@agaetis/solved-install-intl-php-extension-for-xampp-and-magento-for-macos-mojave-41fa42336fc6 https://medium.com/@agaetis/solved-install-intl-php-extension-for-xampp-and-magento-for-macos-mojave-41fa42336fc6)

安装 intl.so 的步骤:正确的 intl 随 PHP 源一起提供,在 PECL 中不可用。

  1. 确保已安装 Xcode 和 autoconf
  2. 从 php.net 下载 XAMPP 中使用的 PHP 版本并运行一系列命令
  3. tar -xzvf php-7.3.10.tar.gz; cd php-7.3.10/ext/intl
  4. /Applications/XAMPP/bin/phpize
  5. ./configure --enable-intl --with-php-config=/Applications/XAMPP/bin/php-config --with-icu-dir=/Applications/XAMPP/xamppfiles/
  6. make
  7. sudo make install

在 php.ini (/Applications/XAMPP/xamppfiles/etc/php.ini) 中添加以下行 扩展名=intl.so

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

生成 1 个错误。 make: *** [php_intl.lo] 错误 1 ​​错误: `make' 失败 的相关文章

随机推荐