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

标签 php linux ubuntu mediawiki

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

phpinfo() 证实了这一点(“PECL”的 CTRL+F = 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

The same error as this prior question on 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";

确认它已加载。 Script from a prior SO question没有收到任何答复。

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

基本上,RAPHF好像同时安装和不安装。前面的问题和攻略都用完了,所以就来了。有什么想法吗?

最佳答案

安装缺少的国际扩展:

sudo apt-get install php5-intl

pecl_httppecl_intl 是两个不同的东西,顺便说一下。

Basically, RAPHF seems to be installed and not installed at the same time.

Web 服务器的 PHP 和控制台 PHP 使用不同的 php.ini 。 所以当你 phpinfo(); 在网络服务器上看到模块 X 时,并不意味着它可以通过 php-cli (pecl == console == php-cli) 获得。

关于php - 安装 PECL 失败,未找到 raphf.so,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32375742/

相关文章:

php - laravel @if 语句显示在 View 中

linux - tar:错误不可恢复:现在退出

c - 如何安装信号处理程序名称 sig_handler

linux - 通过将 -lrt 传递给 gcc 修复了对 `timer_getoverrun' 的 undefined reference 。但为什么?

asp.net-mvc - 使用 Linux 容器将 ASP.NET MVC 托管/部署到 docker

php - 带有表单的 PHP 中的 OOP 概念

php - 矩阵组合逻辑

php - 通过添加/删除外部脚本的链接以编程方式更新页面的源代码。

php - 关于 mysql_fetch_array() 的警告

Git push 说 - 请求的 URL 返回错误 : 403 but with sudo - works