有没有办法在Mac OS X 10.6上安装PHP:s PECL处理程序,与捆绑的PHP一起使用?
我是设置php服务器的新手,我曾经去过其他相关帖子,似乎没有人像我一样有错误.我正在使用MAMP 2.0.2,并运行PHP 5.3.6,我试图使用以下命令在我的本地MAMP上安装oAuth:
$ cd /Applications/MAMP/bin/php/php5.3.6/bin
$ ./pecl install oauth
Run Code Online (Sandbox Code Playgroud)
但是,它会返回这样的错误:
Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050
ERROR: The default config file is not a valid config file or is corrupted.
Run Code Online (Sandbox Code Playgroud)
怎么了?PECL捆绑在MAMP中,应该开箱即用....
更新:
我在其他地方读了一篇帖子,建议配置文件的数据,它保存安装路径是不正确的,所以我在以下文件中更改了一些值:
/Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
Run Code Online (Sandbox Code Playgroud)
然后,我使用命令:
$ ./pecl install oauth
Run Code Online (Sandbox Code Playgroud)
它开始下载和解压缩,但当它尝试安装时,它给出:
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/include -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/main -I/private/tmp/pear/temp/oauth -I/Applications/MAMP/bin/php/php5.3.6/include/php -I/Applications/MAMP/bin/php/php5.3.6/include/php/main -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext …
Run Code Online (Sandbox Code Playgroud) 我根据本手册在Ubuntu上安装了PPA的php5.6和php7.0
http://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu
但我没有得到如何使用pecl
php5.6或php7.0 安装扩展.
例如,我已经安装的版本,libevent
或amqp
在php5.6.
现在当我输入pecl install libevent
和我的活动php版本是php7.0(使用update-alternatives --set php /usr/bin/php7.0),
pecl returns message that
libevent`已经安装.
但它只安装了php5.6(这个版本是活动的),现在我想为php7.0做.
哪些命令对我有帮助?
UPD
我发现这个命令用于将pecl切换到php7.0并将它们分发给可执行的bash脚本:
#!/bin/bash
sudo update-alternatives --set php /usr/bin/php7.0
sudo pecl config-set php_ini /etc/php/7.0/cli/php.ini
sudo pecl config-set ext_dir /usr/lib/php/20151012/
sudo pecl config-set bin_dir /usr/bin/
sudo pecl config-set php_bin /usr/bin/php7.0
sudo pecl config-set php_suffix 7.0
Run Code Online (Sandbox Code Playgroud)
并为php5.6
#!/bin/bash
sudo update-alternatives --set php /usr/bin/php5.6
sudo pecl config-set php_ini /etc/php/5.6/cli/php.ini
sudo pecl config-set ext_dir /usr/lib/php/20131226/
sudo pecl config-set …
Run Code Online (Sandbox Code Playgroud) 我尝试安装xdebug但我得到关于'phpize'的关注错误消息.我怎么能解决这个问题?
leny:~ nick$ sudo pecl install xdebug
Password:
downloading xdebug-2.1.2.tgz ...
Starting to download xdebug-2.1.2.tgz (304,229 bytes)
............done: 304,229 bytes
66 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
Run Code Online (Sandbox Code Playgroud) 我有一个debian服务器,我想通过pecl安装"intl"扩展.
在安装过程中,它询问我:"指定可以找到ICU库和标题的位置[DEFAULT]:"这里我一直在尝试几个选项,包括将其留空以使用DEFAULT,但是我收到以下错误:
configure:错误:C++预处理器"/ lib/cpp"无法进行健全性检查请参阅config.log' for more details.
ERROR:
/ tmp/pear/temp/intl/configure --with-icu-dir = DEFAULT'失败
我已经安装了php5.3:make && make install.我已经安装了"icu",但与php5.3不同,它是用apt-get安装的(我不知道这是否重要).
任何的想法?
stack:PHP 5.4.23,php-fpm,nginx 1.4.x,centos 6.5
我试图安装xdebug,不得不运行phpize命令.
我已经安装了php5-devl并且pecl命令工作
当我运行命令时,它给了我以下错误输出:
# phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
Run Code Online (Sandbox Code Playgroud)
如何解决这个错误?
我已将MacBook升级为Mavericks并破坏了我的开发环境.我现在遇到的问题是我的pear/pecl仍然尝试安装我之前的(5.3)版本的PHP而不是5.4版本.
PHP版本:
$ php -v
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
梨
$ pear version
PEAR Version: 1.9.4
PHP Version: 5.4.17
Zend Engine Version: 2.4.0
Running on: Darwin MBP-retina.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Run Code Online (Sandbox Code Playgroud)
如果我安装apc
$ sudo pecl install apc
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 …
Run Code Online (Sandbox Code Playgroud) Xdebug 已更新到版本 3,目前当我运行时它将安装在最新版本中
pecl install xdebug
Run Code Online (Sandbox Code Playgroud)
这破坏了 Dockerfile 和 XDebug 设置。虽然我计划从长远来看升级到 xdebug@3,但我现在想强制安装 xdebug 2.9。我怎样才能做到这一点?
我尝试做
pecl install xdebug@2
Run Code Online (Sandbox Code Playgroud)
和类似的方法。
如何列出软件包的所有版本以及如何使用 pecl 强制安装特定版本?
我正在尝试安装RabbitMQ PECL扩展但运行后
sudo pecl install amqp
Run Code Online (Sandbox Code Playgroud)
我得到以下神秘的错误消息,广泛的谷歌搜索没有帮助解决.
我安装了这些软件包:
和RabbitMQ在localhost上成功运行
也许它可能是C客户端版本的不匹配以及PECL扩展所期望的,其他人遇到过这个吗?
在下方输出....
干杯
running: make
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp- 1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp - I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp.c -o amqp.lo
libtool: compile: cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear- build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main - I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp.c -fPIC -DPIC …
Run Code Online (Sandbox Code Playgroud) 我是一个绝对的新手......直到一小时前才学习SSh并且在2小时前得到了我的第一个VPS.还在学习!
所以我正在安装MediaWiki,需要添加APC扩展.但是遇到了麻烦.有什么想法/提示吗?
[root@www ~]# pecl install apc`
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 bytes)
.....................................done: 171,591 bytes
55 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
shtool at '/var/tmp/APC/build/shtool' does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.`
Run Code Online (Sandbox Code Playgroud)