But*_*kus 20 ubuntu path pear graph
Ubuntu 精确 (12.04.1 LTS)
我对 PEAR 比较陌生。
我安装了梨。然后,使用 pear 我安装了 phpdoc。
除了图形功能外,它似乎工作得很好。
我运行了这个命令:
/var/www/site5 $ phpdoc -f models/classes.php -t ./docs/classes
Collecting files .. OK
Initializing parser .. OK
Parsing files
Parsing /var/www/site5/models/classes.php
Storing cache in "/var/www/site5/docs/classes" .. OK
Load cache .. 0.026s
Preparing template "clean" .. 0.069s
Preparing 15 transformations .. 0.000s
Build "elements" index .. 0.017s
Replace textual FQCNs with object aliases .. 0.151s
Build "packages" index .. 0.015s
Collect all markers embedded in tags .. 0.015s
Build "namespaces" index and add namespaces to "elements" .. 0.004s
Transform analyzed project into artifacts .. Unable to
find the `dot` command of the GraphViz package. Is GraphViz correctly installed
and present in your path? 12.465s
Analyze results and write report to log .. 0.004s
$
Run Code Online (Sandbox Code Playgroud)
我意识到在这个站点的 apache 虚拟主机中,我有这样一行:
php_value include_path ".:/var/www/site5/includes"
Run Code Online (Sandbox Code Playgroud)
所以我想也许这会阻止包含其他目录......?
所以我试着把这条线改成这样:
php_value include_path ".:/var/www/site5/includes:/usr/lib/php:/usr/share/php"
Run Code Online (Sandbox Code Playgroud)
那也没有用,所以我终于注释掉了这一行,但仍然是同样的错误。
如果这有帮助,在 里面/usr/share,我运行了这个命令:
/usr/share$ find -name "*GraphViz*"
./php/phpDocumentor/vendor/phpdocumentor/graphviz/src/phpDocumentor/GraphViz
./php/phpDocumentor/vendor/phpdocumentor/graphviz/tests/phpDocumentor/GraphViz
./php/Image/GraphViz.php
./php/test/Image_GraphViz
./php/data/phpDocumentor/features/generate-documentation/graphs/GenerateClassDia
gramUsingGraphViz.feature
/usr/share$
Run Code Online (Sandbox Code Playgroud)
我不明白为什么这不起作用。谢谢你的帮助。
小智 44
在“将分析的项目转换为工件”阶段期间,我在生成 PHPDoc 时遇到了这个问题。我通过执行以下命令解决了这个问题
sudo apt-get install graphviz
Run Code Online (Sandbox Code Playgroud)
我尝试使用 PEAR 安装它。
sudo pear install Image_GraphViz
Run Code Online (Sandbox Code Playgroud)
我最终只是升级了(几乎)所有东西并且它起作用了。
apt-get --fix-missing
sudo apt-get install php-pear --fix-missing
sudo apt-get install php-pear
sudo apt-get install php5-xsl
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
不知道究竟是怎么回事,但现在它起作用了。