目前在 CentOS 6.5 上运行 PHP 5.4。
我安装了 webtatic php55w 包,然后通过 PECL 安装了 PEAR+PECL 以及 redis 和 mongo,没有问题。
不久之后,我意识到 5.5 与我正在使用的框架不兼容,所以我 yum 删除了 php55w 并在它的位置安装了 php54w。
现在 pecl 命令根本不起作用。每次我发出任何 pecl 命令时,它都会产生一串非常长的错误(缩写......最多重复几十次):
Warning: Invalid argument supplied for foreach() in Command.php on line 259
Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259
...etc etc etc...
Notice: Undefined index: honorsbaseinstall in Role.php on line 180
Notice: Undefined index: honorsbaseinstall in Role.php on line 180
...etc etc etc...
Notice: Undefined index: installable …Run Code Online (Sandbox Code Playgroud) 我有这个代码
$passengerId = new \MongoId(oPassenger->getId());
return $this->createQueryBuilder('Device')
->update()
->multiple(true)
->field('activated')->set(false)
->field('passenger')->unsetField()->equals($passengerId)
->field('_id')->notEqual($deviceId)
->getQuery()
->execute();
Run Code Online (Sandbox Code Playgroud)
它在我的开发服务器上运行良好,但在我的本地机器上崩溃。
pecl list在开发返回时运行
APC 3.1.13 beta
amqp 1.2.0 stable
intl 3.0.0 stable
mongo 1.3.7 stable
Run Code Online (Sandbox Code Playgroud)
和本地回报:
mongo 1.5.6 stable
xdebug 2.2.5 stable
Run Code Online (Sandbox Code Playgroud)
我机器上的崩溃消息是
"name":"MongoException","message":"Invalid object ID"},"code":500}
Run Code Online (Sandbox Code Playgroud)
我试过降级 mongo 的本地版本,但我无法用 pecl 糟糕的文档来解决这个问题。例如我试过这个:
sudo pecl upgrade -f -c channel://pecl.php.net/mongo-1.3.7
Run Code Online (Sandbox Code Playgroud)
但我一直在获取channel does not exist我所有的频道排列。
也在mongod --version本地运行返回db 版本 v2.6.0,在 dev 上返回db 版本 v2.4.3
想法?
我正在尝试在我的 Ubuntu 服务器上安装 imagick pecl 扩展,但出现以下错误。我已经使用 aptitude 安装了 ImageMagick rpm,pecl 扩展名是 2.3.0 版。我在网上环顾四周,但找不到任何指向正确方向的东西。我还尝试寻找任何看起来像是错误提到的 Wand-config 或 MagickWand-config 程序但找不到的任何东西。
steven@server:/var/www$ sudo pecl install imagick
downloading imagick-2.3.0.tgz ...
Starting to download imagick-2.3.0.tgz (86,976 bytes)
.....................done: 86,976 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Please provide the prefix of Imagemagick installation [autodetect] :
building in /var/tmp/pear-build-root/imagick-2.3.0
running: /tmp/pear/temp/imagick/configure --with-imagick
*** ... snip ... ***
checking ImageMagick MagickWand API …Run Code Online (Sandbox Code Playgroud) http://pecl.php.net/ 中有 PECL 扩展的下载部分, 但我没有得到 PECL *本身** 的安装步骤。以下命令不起作用 -
yum intall pecl
Run Code Online (Sandbox Code Playgroud)
在我的系统中,我安装了 PECL,所以我可以安装这样的 PECL 扩展 -
pecl install mailparse
Run Code Online (Sandbox Code Playgroud)
但是,在运行pecl命令无法识别的系统中,如何在 Fedora 7 系统(旧系统)上先安装 PECL。
我在 CentOs 5 机器上安装 PHP Pecl Intl 扩展时遇到问题。
安装后icu并libicu使用以下命令:
$ yum install icu
$ yum install libicu
Run Code Online (Sandbox Code Playgroud)
我尝试像这样安装 Intl 扩展:
$ /usr/bin/pecl install intl
Run Code Online (Sandbox Code Playgroud)
我选择搜索 ICU 库和头文件的默认位置。它最终会像这样崩溃:
checking whether to enable internationalization support... yes, shared
checking for icu-config... no
checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
ERROR: `/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' failed
Run Code Online (Sandbox Code Playgroud)
按照 …
在这里使用 Ubuntu 12.04、nginx 和 php5-fpm
我让 mongo 在 php 5.3 上运行良好,然后我添加了 ondrej/php5 ppa 并更新到 php5.4。它保留了 GD 和 CURL 扩展,但不保留 mongo。我将该行重新添加到 php.ini 文件中,但什么也没添加。然后我启用了启动错误并得到了这个:
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mongo.so' - /usr/lib/php5/20100525/mongo.so: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
所以,疯狂的猜测,我做了find -name 'mongo.so'并将文件从 20090626/ 移动到 20100525/ ...这导致了这个错误:
PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
Run Code Online (Sandbox Code Playgroud)
然后我做了pecl uninstall mongo和pecl install …
有一个 PHP 扩展,当我安装它时需要传递一个配置选项 pecl命令。我找不到办法做到这一点。
当然我可以手动安装它,但我需要它能够使用单个命令安装它 - 这样它就可以通过 puppet 轻松安装。
有任何想法吗?
我已将 php 升级到第 7 版,现在我在使用 pecl 命令时遇到了问题。当我运行时,sudo pecl install mongo我得到一长串错误:
Warning: Invalid argument supplied for foreach() in Command.php on line 249
Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
Warning: Invalid argument supplied for foreach() in Command.php on line 249
Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
Warning: Invalid argument supplied for foreach() in Command.php on line 249
Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
Run Code Online (Sandbox Code Playgroud)
我已经尝试过这个问题的解决方案:PECL …
我在我的 php 脚本中收到此错误:
Fatal error: Call to undefined function xdiff_file_diff()
我意识到我没有安装 xdiff 扩展。当我尝试使用install pecl xdiff命令安装它时,我收到了这个错误(在其他行中):
配置:警告:如果您想重新生成 PHP,您将需要 re2c 0.13.4 或更高版本配置:错误:请重新安装 libxdiff 发行版
然后我安装了re2c和libxdiff:
wget http://www.compdigitec.com/labs/files/re2c_0135_redhat.rpm
wget ftp://ftp.task.gda.pl/vol/vol1/ftp.pld-linux.org/dists/2.0/PLD/i386/PLD/RPMS/libxdiff-0.7-1.i386.rpm
rpm -ivh re2c_0135_redhat.rpm
rpm -ivh libxdiff-0.7-1.i386
Run Code Online (Sandbox Code Playgroud)
但在那之后我仍然得到同样的错误。
PS:我在谷歌上搜索了很多,我发现有几个人有这个问题,但他们也没有得到答案:(
在我的 Ubuntu 11.04 开发机器上,我安装了 PHP(通过 aptitude)。
我想尝试使用libevent PHP 扩展,但我似乎无法让它工作:
root@alix-laptop:~# pecl install libevent
Failed to download pecl/libevent within preferred state "stable", latest release is version 0.0.4, stability "beta", use "channel://pecl.php.net/libevent-0.0.4" to install
install failed
Run Code Online (Sandbox Code Playgroud)
root@alix-laptop:~# pecl install channel://pecl.php.net/libevent-0.0.4
downloading libevent-0.0.4.tgz ...
Starting to download libevent-0.0.4.tgz (9,003 bytes)
.....done: 9,003 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Please provide the prefix of libevent …Run Code Online (Sandbox Code Playgroud)