windows上使用pear安装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但是有很多乱码