安装PECL失败,raphf.so未找到

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

我正在尝试在运行 Ubuntu 14.10 和 php 5.5.9-1ubuntu4.11 的 VPS 上安装 MediaWiki。我使用本指南安装了 php5。现在我看到 MediaWiki 安装文件。它告诉我缺少可选的 PECL:“警告:intl PECL 扩展不可用于处理 Unicode 规范化,会退回到缓慢的纯 PHP 实现。”

phpinfo()
证实了这一点(CTRL+F 表示“PECL”= 0 次点击)。

但是,如果我运行

sudo pecl install pecl_http
我会收到错误:

...
checking for ext/raphf support... no
    configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
    ERROR: `/tmp/pear/temp/pecl_http/configure --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr' failed

与SO上的先前问题相同的错误。我已经尝试了答案中提到的所有内容,包括将三个“extension=”行添加到 php.ini。

尝试安装 raphf 会导致:

sudo pecl install raphf
pecl/raphf is already installed and is the same as the released version 1.1.0
install failed

phpinfo()
也列出了已安装的 RAPHF 1.1.0。要测试的脚本(通过浏览器访问,而不是通过控制台):

echo extension_loaded(raphf) ? "raphf loaded" : "raphf not loaded";

确认已加载。 来自先前 SO 问题的脚本未收到答案。

如果我搜索例如服务器上的raphf.so文件没有找到。添加到 php.ini 的其他三个扩展也是如此(在其他问题中提到)。

基本上,RAPHF 似乎是同时安装和不安装的。我已经没有了之前的问题和指南可供参考,所以我来到这里。有什么想法吗?

php linux ubuntu mediawiki
2个回答
1
投票

安装缺少的国际扩展:

sudo apt-get install php5-intl
顺便说一句,

pecl_http
pecl_intl
是两个不同的东西。

基本上,RAPHF似乎是同时安装和不安装的 时间。

Web 服务器的 PHP 和控制台 PHP 使用不同的 php.ini 。 因此,当您在网络服务器上

phpinfo();
看到模块 X 时,并不意味着它可以通过 php-cli 使用(pecl == console == php-cli)。


0
投票

sudo apt-get install php-raphf

试试这个来解决 raphf 的问题

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