致命错误:找不到“ext/standard/php_smart_str.h"文件

Fatal error: #39;ext/standard/php_smart_str.h#39; file not found(致命错误:找不到“ext/standard/php_smart_str.h文件)
本文介绍了致命错误:找不到“ext/standard/php_smart_str.h"文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我下载了 MacOS Mojave,并在 2012 年年中的 macbook Pro 上进行了全新安装.使用命令行工具安装 XCode.使用 PEARL、PECL 和最新版本的 ICU (63.1) 使用本机 Apache 和 PHP,以便以后使用 Intl 扩展.

I downloaded MacOS Mojave and did a clean installation on my mid 2012 macbook Pro. Installed XCode with command line tools. Got native Apache and PHP working, with PEARL, PECL and last version of ICU (63.1) for later use of Intl extension.

但是每次国际安装的尝试都失败了.在干净的安装之前,我在笔式驱动器上找到了一个 intl.so 并使用了 ICU 版本 54,但这并不是让事情在开发环境中工作的最佳方式.

But every attempt of Intl instalation has failed. Before the clean instalation, i found a intl.so on a pen drive and used ICU version 54, but isn't the best way to get things working for a development enviroment.

最后,由于找不到 php_smart_str.h 文件,我坚持使用 PECL 无法完成 Intl 的安装.

In the end, i'm stuck with PECL incapable of finish intall of Intl because can't find php_smart_str.h file.

我也重新安装了开发者工具头文件:

I've reinstalled the developer tools header files too:

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

是否可以拥有没有 Homebrew 的开发环境?

Is it possible to have a development enviroment without Homebrew?

当我在终端运行时:

sudo pecl install intl

返回以下内容:

/private/tmp/pear/install/intl/intl_error.h:24:10: 致命错误:'ext/standard/php_smart_str.h' 文件未找到

在创建 libtool 并运行之后:make.

Right after creating libtool and running: make.

推荐答案

好吧,我真的只想使用 Mac OS Mojave MacBook Pro 上预装的原生 apache 和 php,而不是使用自制软件,试图保持CakePHP 使用的最干净的开发环境.

Ok, instead of using homebrew, i really wanted to use only native apache and php pre-installed on my MacBook Pro with Mac OS Mojave, trying to maintain the most clean development environment possible for CakePHP use.

所以,在 Pecl 官方网站上(https://pecl.php.net/package/intl ),很明显 Intl 包不再维护并已被取代.从 PHP 5.3.0 开始,您不需要使用 Pecl 来安装 intl 扩展,它与 PHP 捆绑在一起.

So, on Pecl Official site ( https://pecl.php.net/package/intl ), it's clear that Intl package is not maintained anymore and has been superseded. Since PHP 5.3.0 you don't need to use Pecl to install intl extension, it's bundled with PHP.

但是,它在 Mac OS Mojave 上的 PHP 7.1.24 本地安装中缺失.

But, it's missing on native instalation of PHP 7.1.24 on Mac OS Mojave.

然后我从 php.net 下载了 PHP 7.1,安装了 XCode 命令行工具,ICU (http://site.icu-project.org/),Autoconf,重新安装开发者工具头文件,最后使用phpize安装Intl扩展.

Then i downloaded PHP 7.1 from php.net, installed XCode Command Line Tools, ICU (http://site.icu-project.org/), Autoconf, reinstalled the developer tools header files, and finally installed Intl extension using phpize.

重要提示:您必须禁用 SIP.

Important: you'll have to disable SIP.

这篇关于致命错误:找不到“ext/standard/php_smart_str.h"文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)