欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

windows上使用pear安装php扩展 博客分类: php php pear pecl 

程序员文章站 2024-03-23 15:29:10
...
在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但是有很多乱码
相关标签: php pear pecl