【问题标题】:phploc installation not working on ubuntuphploc安装在ubuntu上不起作用
【发布时间】:2013-08-31 03:21:02
【问题描述】:

我正在尝试在我的 ubuntu 13.04 上安装 phploc,但我遵循的步骤似乎在这里不起作用。

$ sudo pear config-set auto_discover 1
$ sudo pear install phpunit/phploc
phpunit/phploc can optionally use PHP extension "bytekit"
downloading phploc-1.7.4.tgz ...
Starting to download phploc-1.7.4.tgz (10,134 bytes) .....
done: 10,134 bytes
install ok: channel://pear.phpunit.de/phploc-1.7.4 .de/phploc

然后当我输入 phploc 时它给出了这个错误

$ phploc
PHP 警告: require_once(SebastianBergmann/FinderFacade/autoload.php): 失败 打开流:中没有这样的文件或目录 /usr/share/php/SebastianBergmann/PHPLOC/autoload.php 第 44 行 PHP 堆栈跟踪:PHP 1. {main}() /usr/bin/phploc:0 PHP 2.require() /usr/bin/phploc:48 PHP 致命错误:require_once():打开失败 需要'SebastianBergmann/FinderFacade/autoload.php' (include_path='.:/usr/share/php.;/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/') 在 /usr/share/php/SebastianBergmann/PHPLOC/autoload.php 第 44 行 PHP 堆栈跟踪:PHP 1. {main}() /usr/bin/phploc:0 PHP 2.require() /usr/bin/phploc:48

这是我的 php 包含路径

$ php -i | grep include <br>
allow_url_include => Off => Off
include_path => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/ => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/
MYSQL_INCLUDE => -I/usr/include/mysql
xdebug.collect_includes => On => On
and included in the distribution in the file:  LICENSE

【问题讨论】:

    标签: php pear phploc


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      我从https://github.com/sebastianbergmann/phploc 下载了 phploc 存档,将其移至 /usr/bin/phploc.phar。

      然后我在我的 .bashrc 中创建了一个别名,如下所示 别名 phploc='/usr/bin/phploc.phar'

      现在我可以像这样访问 phploc

      root@# phploc Sebastian Bergmann 的 phploc 1.7.4。

      用法:phploc [开关] ...

      --count-tests 统计 PHPUnit 测试用例类和测试方法。

      --log-xml 以 XML 格式将结果写入文件。 --log-csv 将结果以 CSV 格式写入文件。

      --exclude 从代码分析中排除。 --names 要检查的文件名的逗号分隔列表。 (默认:*.php)

      --help 打印此使用信息。 --version 打印版本并退出。

      --progress 打印进度条。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-03
        • 2016-11-09
        • 1970-01-01
        • 2016-10-13
        • 2018-01-15
        • 1970-01-01
        • 1970-01-01
        • 2014-07-03
        相关资源
        最近更新 更多