21:39 2016/7/21
2016 windows安装phing:安装成功
注意:
出现错误时就去更新pear:
参见:http://www.cnblogs.com/pinnasky/archive/2011/12/20/2295121.html
国外解释:
To fix it I had to upgrade PEAR itself:
.......
And then phing installed perfect:
参见国外解释:http://gruz.org.ua/en/tech-blog/linux-notes/51-opensuse-114-linux-phing-install-problem.html
或者国内:http://www.cnblogs.com/pinnasky/archive/2011/12/20/2295121.html
特别注意:下载压缩包安装的方式要进行一步命令:pear install phing-2.14.0.tgz
注意:命令中是直接运行的压缩包,而不是解压缩后的包!!
二、phing的安装配置
phing有两种安装方法,第一种方法是利用pear命令安装,第二种方法是自己下载phing包并配置相关环境变量。第一种方法目前容易失败,所以这里介绍第二种方法。
安装phing,要先搭建好php环境。
然后,去官网http://www.phing.info/ 下载最新版的phing压缩包,我下载的是phing-2.6.1.zip,把压缩包放在D:\Program Files\phing目录下,解压,然后,我们需要配置环境变量如下:
PHING_HOME=D:\Program Files\phing
PHP_CLASSPATH=D:\Program Files\phing\classes
PHP_COMMAND=D:\AppServ\php5\php.exe
PATH=%PHING_HOME%\bin
为了验证phing是否安装成功,我们打开cmd命令行,输入phing,如果出现:Buildfile:build.xml does not exist!,则表示安装成功。
感谢参见:http://blog.csdn.net/onlyanyz/article/details/12704639
去它官网下载压缩包:
页面上下载点击处:Or, manually download the ?package and install using:
下载页面:http://www.phing.info/trac/wiki/Users/News/Phing%202.14.0%20released
出现错误:
F:\wamp\bin>pear install phing-2.14.0.tgz
WARNING: "pear/PEAR_PackageFileManager" is deprecated in favor of "pear/PEAR_PackageFileManager2"
Unknown remote channel: pear.pdepend.org
Unknown remote channel: pear.phpmd.org
Unknown remote channel: pear.phpdoc.org
Did not download optional dependencies: phing/phingdocs, pear/VersionControl_Git, pecl/Xdebug, pear/PEAR_PackageFileManager, pear/Services_Amazon_S3, pear/HTTP_Request2, channel://pear.pdepend.org/PHP_Depend, channel://pear.phpmd.org/PHP_PMD, channel://pear.phpdoc.org/phpDocumentor, pear/PHP_CodeSniffer, pear/Net_Growl, use --alldeps to download automatically
phing/phing can optionally use package "phing/phingdocs" (version >= 2.14.0)
phing/phing requires package "pear/VersionControl_SVN" (version >= 0.4.0), installed version is 0.3.3
phing/phing can optionally use package "pear/VersionControl_Git" (version >= 0.4.3)
phing/phing can optionally use package "pecl/Xdebug" (version >= 2.0.5)
phing/phing can optionally use package "pear/PEAR_PackageFileManager" (version >= 1.5.2)
phing/phing can optionally use package "pear/Services_Amazon_S3" (version >= 0.3.1)
phing/phing can optionally use package "pear/HTTP_Request2" (version >= 2.1.1)
phing/phing can optionally use package "channel://pear.pdepend.org/PHP_Depend" (version >= 0.10.0)
phing/phing can optionally use package "channel://pear.phpmd.org/PHP_PMD" (version >= 1.1.0)
phing/phing can optionally use package "channel://pear.phpdoc.org/phpDocumentor" (version >= 2.0.0b7)
phing/phing can optionally use package "pear/PHP_CodeSniffer" (version >= 1.5.0)
phing/phing can optionally use package "pear/Net_Growl" (version >= 2.6.0)
No valid packages found
install failed
F:\wamp\bin>
清理缓存:
F:\wamp\bin>pear clear-cache
reading directory F:\wamp\www\my_pear\my_cache
400 cache entries cleared
F:\wamp\bin>
出现错误,更新pear:
参见:http://www.cnblogs.com/pinnasky/archive/2011/12/20/2295121.html
国外解释:
To fix it I had to upgrade PEAR itself:
.......
And then phing installed perfect:
# pear install phing/phing
Unknown remote channel: pear.phpunit.de
WARNING: "pear/PEAR_PackageFileManager" is deprecated in favor of "pear/PEAR_PackageFileManager2"
Unknown remote channel: pear.pdepend.org
Unknown remote channel: pear.phpmd.org
Unknown remote channel: pear.phpunit.de
Unknown remote channel: pear.docblox-project.org
Did not download optional dependencies: channel://pear.phpunit.de/PHPUnit, pecl/Xdebug, pear/PEAR_PackageFileManager, channel://pear.pdepend.org/PHP_Depend, channel://pear.phpmd.org/PHP_PMD, channel://pear.phpunit.de/phpcpd, channel://pear.docblox-project.org/DocBlox, use --alldeps to download automatically
phing/phing can optionally use package "channel://pear.phpunit.de/PHPUnit" (version >= 3.4.0)
phing/phing can optionally use package "pecl/Xdebug" (version >= 2.0.5)
phing/phing can optionally use package "pear/PEAR_PackageFileManager" (version >= 1.5.2)
phing/phing can optionally use package "channel://pear.pdepend.org/PHP_Depend" (version >= 0.10.0)
phing/phing can optionally use package "channel://pear.phpmd.org/PHP_PMD" (version >= 1.1.0)
phing/phing can optionally use package "channel://pear.phpunit.de/phpcpd" (version >= 1.3.2)
phing/phing can optionally use package "channel://pear.docblox-project.org/DocBlox" (version >= 0.14.0)
downloading phing-2.4.8snapshot20111006230626.tgz ...
Starting to download phing-2.4.8snapshot20111006230626.tgz (414,835 bytes)
.....................................................................................done: 414,835 bytes
install ok: channel://pear.phing.info/phing-2.4.8snapshot20111006230626
参见:http://gruz.org.ua/en/tech-blog/linux-notes/51-opensuse-114-linux-phing-install-problem.html
安装成功。