Hướng dẫn error phpize failed mac - lỗi phpize bị lỗi mac

Tôi cố gắng cài đặt xdebug nhưng tôi nhận được thông báo lỗi theo dõi về 'phpize'. Làm thế nào tôi có thể sửa chữa điều này?

leny:~ nick$ sudo pecl install xdebug
Password:
downloading xdebug-2.1.2.tgz ...
Starting to download xdebug-2.1.2.tgz (304,229 bytes)
............done: 304,229 bytes
66 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed

Hướng dẫn error phpize failed mac - lỗi phpize bị lỗi mac

Cœur

356K24 Huy hiệu vàng188 Huy hiệu bạc257 Huy hiệu đồng24 gold badges188 silver badges257 bronze badges

Hỏi ngày 8 tháng 12 năm 2011 lúc 12:27Dec 8, 2011 at 12:27

1

Bạn cũng có thể cài đặt AutoConf thông qua Homebrew. Chỉ cần chạy

brew install autoconf

Và tất cả sẽ hoạt động

Hướng dẫn error phpize failed mac - lỗi phpize bị lỗi mac

Đã trả lời ngày 19 tháng 3 năm 2012 lúc 12:34Mar 19, 2012 at 12:34

Jeroenbourgoisjeroenbourgoisjeroenbourgois

9711 Huy hiệu vàng6 Huy hiệu bạc3 Huy hiệu đồng1 gold badge6 silver badges3 bronze badges

2

"Không thể tìm thấy AutoConf" - Cài đặt AutoConf và thử lại.

sudo port install autoconf Nhưng bạn cần Xcode và MacPorts theo như tôi biết.

Đã trả lời ngày 8 tháng 12 năm 2011 lúc 12:36Dec 8, 2011 at 12:36

Narcis radunarcis raduNarcis Radu

2.49122 huy hiệu bạc33 huy hiệu đồng22 silver badges33 bronze badges

1

Đối với tôi, tôi đã không đồng ý với giấy phép xcode:-

$ sudo /usr/bin/m4 --version


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

IMPORTANT: BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE FOLLOWING APPLE TERMS:

Đã trả lời ngày 8 tháng 3 năm 2014 lúc 17:10Mar 8, 2014 at 17:10

Hướng dẫn error phpize failed mac - lỗi phpize bị lỗi mac

Tôi vừa nâng cấp hệ điều hành của mình lên Mountain Lion và PECL không còn hoạt động nữa (nó đang lái thử để không có kịch tính nào, nhưng tôi cũng muốn nó hoạt động để tôi có thể nâng cấp hệ điều hành trên SSD mới sáng bóng của mình).

Tôi đang sử dụng cài đặt PHP gốc, không có macports/homebrew hoặc bất cứ thứ gì tương tự.

Chạy sudo pecl install uploadprogress (ví dụ) tạo ra đầu ra đầu cuối sau:

downloading uploadprogress-1.0.3.1.tgz ...
Starting to download uploadprogress-1.0.3.1.tgz (9,040 bytes)
.....done: 9,040 bytes
4 source files, building
running: phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
autom4te: need GNU m4 1.4 or later: /usr/bin/m4
ERROR: `phpize' failed

Tôi đoán vấn đề là 3 dòng grep. Tôi đã tìm thấy một số chủ đề cho thấy điều này là do Xcode không được cài đặt ... nhưng Xcode được cài đặt và được cập nhật lên phiên bản mới nhất (4.4). Tất cả các liên kết symlink có liên quan đến /Developer/usr/bin/* cũng tồn tại như họ cần.

M4 hiện đang ở phiên bản: m4 (GNU M4) 1.4.13, vì vậy mặc dù đầu ra ở trên chứa một dòng liên quan đến nó, tôi không nghĩ rằng đó có thể là vấn đề.

Tôi chắc rằng đó chỉ là một vấn đề đơn giản, có ai có manh mối không?

Xin chào, cảm ơn vì đã trở lại rất nhanh. Catalina có Php 7.3.11 Php - -Ini mặc định
Thanks for getting back so quickly.
Catalina has default php 7.3.11
php --ini

Tệp cấu hình (Php.ini) Đường dẫn: /etc được tải tệp cấu hình: /etc/php.ini quét cho các tệp .ini bổ sung trong: (Không) Tệp .ini bổ sung được phân tích cú pháp: (Không)
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)

Tôi đã thay đổi /etc/apache2/httpd.conf thành loadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7. /Local/etc/php/7.4 Và nó có phần mở rộng = redis.so
LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so
So phpinfo() show the PHP Version 7.4.7
and the path to ini file /usr/local/etc/php/7.4 and it does have extension=redis.so

Ngoài ra, nếu tôi chạy bharatis-macbook-pro-2: bin bharati $ /usr API = 20180731 PHP được biên dịch với mô -đun API = 20190902 Các tùy chọn này cần phải khớp với không rõ trên dòng 0
bharatis-MacBook-Pro-2:bin bharati$ /usr/local/Cellar/php/7.4.7/bin/php --ini
PHP Warning: PHP Startup: redis: Unable to initialize module
Module compiled with module API=20180731
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0

CẢNH BÁO: Php Startup: Redis: Không thể khởi tạo mô -đun mô -đun được biên dịch với mô -đun API = 20180731 PHP được biên dịch với mô -đun API = 20190902 Các tùy chọn này cần phải khớp trong không xác định trên đường dẫn cấu hình dòng 0 (Php.ini) /php/7.4 Tệp cấu hình được tải: /usr/local/etc/php/7.4/php.ini quét các tệp .ini bổ sung trong: /USR /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
Module compiled with module API=20180731
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/7.4
Loaded Configuration File: /usr/local/etc/php/7.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini

Vì vậy, tôi thay đổi PHPDIR = "________ 9/Build" thành phpdir = "/usr/local/cellar/php/7.4.7/lib/php/build" Trong phpize Tôi nhận được thông báo sau.
phpdir="eval echo ${exec_prefix}/lib/php/build"
to
phpdir="/usr/local/Cellar/php/7.4.7/lib/php/build"
in phpize I get the following message.

SUDO ~/PHP-PRIVATE/PHPIZE Cấu hình cho: Php API Phiên bản: 20190902 Mô-đun Zend API số: 20190902 Zend Extension API NO: 320190902 CP: MKDEP.AWK: Không có tệp hoặc thư mục đó CP: acinclude.m4: Không có tệp hoặc thư mục/ứng dụng như vậy Không có tệp hoặc thư mục nào như vậy Autom4te:/usr/bin/m4 không thành công với trạng thái thoát: 1 Cảm ơn,
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
cp: mkdep.awk: No such file or directory
cp: scan_makefile_in.awk: No such file or directory
cp: acinclude.m4: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/m4:configure.ac:8: cannot open `build/php_cxx_compile_stdcxx.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
Thanks,