phploc安装不适用于ubuntu

时间:2021-10-13 07:17:18

I am trying to install phploc on my ubuntu 13.04 and it doesn't seem to work here are the steps I followed.

我正在尝试在我的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

Then when i type phploc it givies this error

然后,当我键入phploc时,它会给出这个错误

$ phploc
PHP Warning: require_once(SebastianBergmann/FinderFacade/autoload.php): failed to open stream: No such file or directory in /usr/share/php/SebastianBergmann/PHPLOC/autoload.php on line 44 PHP Stack trace: PHP 1. {main}() /usr/bin/phploc:0 PHP 2. require() /usr/bin/phploc:48 PHP Fatal error: require_once(): Failed opening required 'SebastianBergmann/FinderFacade/autoload.php' (include_path='.:/usr/share/php.;/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/') in /usr/share/php/SebastianBergmann/PHPLOC/autoload.php on line 44 PHP Stack trace: PHP 1. {main}() /usr/bin/phploc:0 PHP 2. require() /usr/bin/phploc:48

$ phploc PHP警告:require_once(SebastianBergmann / FinderFacade / autoload.php):无法打开流:第44行/usr/share/php/SebastianBergmann/PHPLOC/autoload.php中没有此类文件或目录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

Here is my php include path

这是我的php include路径

$ 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

2 个解决方案

#1


1  

Try the installation guide at: https://github.com/sebastianbergmann/phploc

请尝试安装指南:https://github.com/sebastianbergmann/phploc

#2


-1  

I downloaded the phploc archive from https://github.com/sebastianbergmann/phploc, moved it to /usr/bin/phploc.phar.

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

Then i created an alias in my .bashrc as below alias phploc='/usr/bin/phploc.phar'

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

now i am able to access phploc like this

现在我能够像这样访问phploc

root@# phploc phploc 1.7.4 by Sebastian Bergmann.

来自Sebastian Bergmann的root @#phploc phploc 1.7.4。

Usage: phploc [switches] ...

用法:phploc [开关] ......

--count-tests Count PHPUnit test case classes and test methods.

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

--log-xml Write result in XML format to file. --log-csv Write result in CSV format to file.

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

--exclude Exclude from code analysis. --names A comma-separated list of file names to check. (default: *.php)

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

--help Prints this usage information. --version Prints the version and exits.

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

--progress Print progress bar.

--progress打印进度条。

#1


1  

Try the installation guide at: https://github.com/sebastianbergmann/phploc

请尝试安装指南:https://github.com/sebastianbergmann/phploc

#2


-1  

I downloaded the phploc archive from https://github.com/sebastianbergmann/phploc, moved it to /usr/bin/phploc.phar.

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

Then i created an alias in my .bashrc as below alias phploc='/usr/bin/phploc.phar'

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

now i am able to access phploc like this

现在我能够像这样访问phploc

root@# phploc phploc 1.7.4 by Sebastian Bergmann.

来自Sebastian Bergmann的root @#phploc phploc 1.7.4。

Usage: phploc [switches] ...

用法:phploc [开关] ......

--count-tests Count PHPUnit test case classes and test methods.

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

--log-xml Write result in XML format to file. --log-csv Write result in CSV format to file.

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

--exclude Exclude from code analysis. --names A comma-separated list of file names to check. (default: *.php)

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

--help Prints this usage information. --version Prints the version and exits.

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

--progress Print progress bar.

--progress打印进度条。