`
zhangcs053
  • 浏览: 33116 次
  • 性别: Icon_minigender_1
  • 来自: 徐州
社区版块
存档分类
最新评论

windows上使用pear安装php扩展

    博客分类:
  • php
阅读更多
在windows上使用pear安装php扩展
相关网站:
http://www.php.net
http://pear.php.net
http://pear2.php.net
http://pecl.php.net
pear2需要使用sqlite3
执行命令:
1、php D:\php\php5.3.5\pyrus.phar install D:\php\php5.3.5\ext\libevent-0.0.4.tgz
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\php\php5.3.5\ext
Downloading pecl.php.net/libevent
PEAR2\Pyrus\Registry\Exception: Error: package pecl.php.net/libevent could not b
e installed in registry: Unable to execute statement: constraint failed
Exception: Unable to execute statement: constraint failed

2、php D:\php\php5.3.5\pyrus.phar -v install pecl/libevent
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\wamp\bin\php\php5.3.5\ext
PEAR2\Pyrus\Installer\Exception: Dependency validation failed for some packages
to install, installation aborted
PEAR2\Pyrus\Package\Dependency\Set\Exception: Unable to find a compatible relea
se for pecl.php.net/libevent

3、php D:\php\php5.3.5\pyrus.phar -v install pecl/libevent-0.0.4
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\php\php5.3.5\ext
Downloading pecl.php.net/libevent

Connected...
Mime-type: application/octet-stream

[================>
[================================================================>
[===============================================================================
PHP Warning:  rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denie
d in phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Filesystem.php on line 103
PHP Stack trace:
PHP   1. {main}() D:\php\php5.3.5\pyrus.phar:0
PHP   2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\php\php5.3.5\pyr
us.phar:52
PHP   3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar://D:/wamp/bin/php/p
hp5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.p
hp:284
PHP   4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/php/php5.3.5/pyrus.p
har/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.php:491
PHP   5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/php/php5.3.5/pyrus.
phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
PHP   6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObject() phar://D:/wam
p/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:
465
PHP   7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransaction() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction.php:71
PHP   8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__construct() phar://D:/
wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileT
ransaction/Manager.php:67
PHP   9. PEAR2\Pyrus\AtomicFileTransaction\Transaction->begin() phar://D:/wamp/b
in/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransac
tion/Transaction.php:37
PHP  10. PEAR2\Pyrus\AtomicFileTransaction\Transaction\TwoStage->begin() phar://
D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFi
leTransaction/Transaction.php:60
PHP  11. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->begin() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction/Transaction/TwoStage.php:49
PHP  12. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php/php5.3.5/pyrus.ph
ar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/Transaction/Base.ph
p:91
PHP  13. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/
php/PEAR2/Pyrus/Filesystem.php:103

Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denied in
phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/F
ilesystem.php on line 103

Call Stack:
    0.1306    1507856   1. {main}() D:\php\php5.3.5\pyrus.phar:0
    0.1884    3129712   2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\wamp\bi
n\php\php5.3.5\pyrus.phar:52
    0.3137    5680856   3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar:/
/D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptF
rontend/Commands.php:284
    0.3496    7156424   4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/ph
p/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Command
s.php:491
    2.6276   10275160   5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/p
hp/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
    2.6295   10278280   6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObje
ct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Installer.php:465
    2.6295   10278280   7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransac
tion() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction.php:71
    2.6338   10484696   8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__cons
truct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2
/Pyrus/AtomicFileTransaction/Manager.php:67
    2.6345   10485016   9. PEAR2\Pyrus\AtomicFileTransaction\Transaction->begin(
) phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus
/AtomicFileTransaction/Transaction.php:37
    2.6345   10485016  10. PEAR2\Pyrus\AtomicFileTransaction\Transaction\TwoStag
e->begin() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PE
AR2/Pyrus/AtomicFileTransaction/Transaction.php:60
    2.6352   10485016  11. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->b
egin() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction/Transaction/TwoStage.php:49
    2.6357   10484968  12. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php
/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/T
ransaction/Base.php:91
    2.6369   10486400  13. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PE
AR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Filesystem.php:103

PHP Warning:  rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denie
d in phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Filesystem.php on line 103
PHP Stack trace:
PHP   1. {main}() D:\php\php5.3.5\pyrus.phar:0
PHP   2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\php\php5.3.5\pyr
us.phar:52
PHP   3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar://D:/wamp/bin/php/p
hp5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.p
hp:284
PHP   4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/php/php5.3.5/pyrus.p
har/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.php:491
PHP   5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/php/php5.3.5/pyrus.
phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
PHP   6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObject() phar://D:/wam
p/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:
465
PHP   7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransaction() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction.php:71
PHP   8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__construct() phar://D:/
wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileT
ransaction/Manager.php:67
PHP   9. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->rollback() phar://D
:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFil
eTransaction/Transaction.php:40
PHP  10. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php/php5.3.5/pyrus.ph
ar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/Transaction/Base.ph
p:118
PHP  11. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/
php/PEAR2/Pyrus/Filesystem.php:103

Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denied in
phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/F
ilesystem.php on line 103

Call Stack:
    0.1306    1507856   1. {main}() D:\php\php5.3.5\pyrus.phar:0
    0.1884    3129712   2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\wamp\bi
n\php\php5.3.5\pyrus.phar:52
    0.3137    5680856   3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar:/
/D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptF
rontend/Commands.php:284
    0.3496    7156424   4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/ph
p/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Command
s.php:491
    2.6276   10275160   5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/p
hp/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
    2.6295   10278280   6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObje
ct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Installer.php:465
    2.6295   10278280   7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransac
tion() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction.php:71
    2.6338   10484696   8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__cons
truct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2
/Pyrus/AtomicFileTransaction/Manager.php:67
    2.7068   10504272   9. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->r
ollback() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEA
R2/Pyrus/AtomicFileTransaction/Transaction.php:40
    2.7069   10504224  10. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php
/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/T
ransaction/Base.php:118
    2.7078   10505656  11. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PE
AR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Filesystem.php:103

PEAR2\Pyrus\Installer\Exception: Installation failed
PEAR2\Pyrus\AtomicFileTransaction\MultiException: Unable to begin transaction
  PEAR2\Pyrus\IOException: Unable to fully remove D:\php\php5.3.5\ext\.
journal-src
   PEAR2\Pyrus\AtomicFileTransaction\RuntimeException: Cannot rollback - not in
a transaction
需要清除相关的文件夹cache、.configsnapshots、.journal-docs、.journal-src、downloads
之后报错:
D:\php\php5.3.5\ext>php D:\php\php5.3.5\pyrus.phar -v install
pecl/libevent-0.0.4
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\wamp\bin\php\php5.3.5\ext
Downloading pecl.php.net/libevent

Connected...
Mime-type: application/octet-stream

[================>
[================================================>
[==========================================================================>
PEAR2\Pyrus\Registry\Exception: Error: package pecl.php.net/libevent could not b
e installed in registry: Unable to execute statement: constraint failed
Exception: Unable to execute statement: constraint failed
和使用本地文件安装报错是一样的,应该sql语句执行的过程中出现了错误,但是如何显示错误的sql语句呢?
打开.pear2registry但是有很多乱码
0
1
分享到:
评论

相关推荐

    Windows安装Pear所需文件

    安装完成后,你可以通过`pear`命令行工具来管理PHP扩展和库。例如,安装一个新的pear包可以使用: ```bash pear install package_name ``` 更新已安装的包: ```bash pear upgrade package_name ``` 查看可用的...

    安装pear和phpunit

    对于Windows用户,如果已安装了Zend Server和Zend Studio,且使用的是Apache服务器,可以考虑安装PEAR来增强开发体验。安装前,请确保已安装了Zend Server + Zend Studio + Apache,并且版本兼容。 - **步骤2:...

    jsj_PHPpear的安装和使用.pdf

    本文档主要介绍了PHP Pear的安装和使用方法,内容包括Pear的基础知识、Pear在不同操作系统中的安装方法,以及如何通过Pear安装和管理PHP扩展和包。 首先,Pear是PHP的官方扩展库,它是一个框架和分发系统,用于获取...

    php-pear install

    PHP 扩展和应用库(PHP Extension and Application Repository,简称 PEAR)是 PHP 的一个官方扩展管理工具,它提供了一种标准的框架和工具来管理和分发 PHP 类库和模块。在 PHP 开发中,使用 PEAR 可以方便地安装和...

    Windows 下的 PHP-PEAR 安装方法

    go-pear.php是一个安装脚本,它的主要作用是自动下载并安装PHP扩展库的框架,也就是我们所说的PHP-PEAR。它能够自动检测系统环境并配置相应的库文件,使得整个安装过程变得简单。 知识点六:PHP-PEAR打包下载地址 ...

    pear及phpUnit的安装教程

    在Windows环境下,如果你使用的是WAMP(Windows Apache MySQL PHP)服务器套件,安装PEAR可以通过以下步骤进行: 1. 下载最新版本的PEAR安装包,通常是一个名为`go-pear.phar`的文件。 2. 将`go-pear.phar`移动到你...

    php_pear_smarty_manual

    2. **pear_manual_zh.chm** - 这是中文版的PEAR手册,详细介绍了PEAR库的安装、使用方法和各个组件的功能,对于使用PEAR扩展的开发者非常有帮助。 3. **PHP_search_中文手册.CHM** - 可能是一个包含了PHP搜索功能的...

    Windows下的PHP安装pear教程

    安装pear之后,可以通过pear命令来管理和安装PHP扩展和包。例如,安装PHPUnit时,只需要在CMD中输入"pear install PHPUnit",即可开始安装过程。如果需要更新pear本身或其他pear包,可以使用"pear upgrade"命令进行...

    Windows环境下安装PHP Pear的方法图文教程

    在Windows操作系统环境下安装PHP的Pear扩展,可以帮助PHP开发者们快速安装和使用PHP的各种库,这相当于Perl中的CPAN(Comprehensive Perl Archive Network)。Pear代表PHP Extension and Application Repository,是...

    PHP使用pear实现mail发送功能 windows环境下配置pear

    在Windows环境下配置PHP使用pear发送邮件功能需要几个步骤。首先,Pear是PHP的一个扩展库,它可以简化许多常见的编程任务,包括邮件发送。在PHP自带的mail()函数存在限制的情况下,pear的Mail类使用SMTP协议可以提供...

    windows下安装PEAR php5.3.1下解决出错的方法

    本文主要讨论如何在 Windows 操作系统上安装 PEAR(PHP Extension and Application Repository),并解决在 PHP 5.3.1 版本环境下安装过程中遇到的问题。PEAR 是一个基于 PHP 的软件包管理器,提供了大量的 PHP 扩展...

    windows下安装pear及phpunit(注意配置好php命令行环境)

    5. 如果在安装PHPUnit时选择了下载可选依赖,确保PHP环境已安装了必要的PHP扩展,比如pdo_sqlite、soap和xdebug等。 以上步骤完成后,应该能够在命令行下成功运行pear和phpunit命令,从而开始进行PHP的包管理和单元...

    PHP pear安装配置教程

    PEAR(PHP Extension and Application Repository)是PHP扩展与应用的一个代码仓库,是PHP代码的仓库,类似于Perl中的CPAN(Comprehensive Perl Archive Network)。在PEAR中,可以找到大量有用的代码库,这些代码库...

    php安装xdebug/php安装pear/phpunit详解步骤(图)

    首先,本篇教程是针对在WAMP环境下安装PHP扩展Xdebug、包管理工具Pear以及PHP单元测试框架PHPUnit的具体指导。WAMP环境是指在Windows操作系统上,安装了Apache服务器、MySQL数据库以及PHP环境的一种开发设置。本教程...

    php6 windows系统的php6.0

    `go-pear.bat`:这是一个PHP的Pear安装脚本,用于在PHP环境中安装Pear(PHP扩展与应用仓库),它是PHP的一个包管理工具,能够帮助用户方便地安装和管理PHP的扩展库。 `icudt36.dll`、`icuuc36.dll`、`icuin36.dll`...

    PHP-pear学习资料

    - 使用命令行工具进行安装,例如在 Linux 上可以通过 `sudo apt-get install php-pear` 命令安装。 - 安装完成后,可以通过命令 `pear list-channels` 查看已知的 PEAR 通道列表。 #### 三、PEAR 的基本使用 **...

    PHP使用Pear发送邮件(Windows环境)

    本文实例介绍了PHP使用Pear发送邮件的方法,以及如何在Windows下安装PHP Pear的步骤,分享给大家供大家参考,具体内容如下 一、PEAR安装 1、PEAR简介 PEAR是PHP扩展与应用库(the PHP Extension and Application ...

Global site tag (gtag.js) - Google Analytics