是否可以通过PECL安装来安装Mailparse扩展 – 无需重新编译PHP

我基本上把这个问题,因为我想使用PHP:Mailparse扩展,并坚持在其安装。 但是,我也想知道PHP扩展安装的一些基本知识 – 请查看底部 – 关于扩展安装的基本问题 。 这可能是一个愚蠢的问题,但我仍然对这些事情有很多困惑,总是在重要的时刻卡住。 所以,请原谅我,如果可以的话,帮助我

我尝试了以下方法来安装Mailparse扩展 –

重新编译PHP
我试图去使用mailparse扩展重新编译PHP,但我无法做到这一点 – 检查https://serverfault.com/questions/227976/on-which-location-to-run-configure-while-recompiling-php 。

PECL命令安装
我在想,因为这是一个PECL扩展名,可以通过pecl install mailparse命令来安装吗? 在运行该命令,它启动过程 –

 downloading mailparse-2.1.5.tgz ... Starting to download mailparse-2.1.5.tgz (37,332 bytes) ..........done: 37,332 bytes 9 source files, building running: phpize grep: /opt/lampp/include/php/main/php.h: No such file or directory grep: /opt/lampp/include/php/Zend/zend_modules.h: No such file or directory 

但是我终于明白了这一点,

 ... ... /tmp/pear/temp/mailparse/php_mailparse.h:113: error: declaration for parameter 'def_charset' but no such parameter /tmp/pear/temp/mailparse/mailparse.c:1540: error: expected '{' at end of input make: *** [mailparse.lo] Error 1 ERROR: `make' failed 

下载mailparse包
另外,他们在这里http://pecl.php.net/package/mailparse提供mailparse包下载选项。 我下载了它,但不知道该把它放在哪里以及如何安装。

有关扩展安装的基本问题
那么,所有这些安装扩展的方法是否有效呢? 如果是这样,他们为什么说在PHP中:Mailparse的扩展名 –

 In order to use these functions you must compile PHP with mailparse support by using the --enable-mailparse configure option. 

是因为这个扩展已经被转移到了PECL仓库吗? 对于没有移动到PECL存储库的其他PHP扩展,是否必须重新编译PHP?

谢谢

你最好的select是像你一样安装PECL包,你的问题是你错过了PHP头,他们是任何编译涉及PHP代码所必需的。

尝试下载头文件(在源代码包中提供)并复制它们,PECL正在抱怨,直到你得到你的PECL模块编译。

最好的运气! 这是一个令人兴奋的任务:)