大网数据广告活动
服务器运维问答

Error - Unable to find `dot` command of the GraphViz package

· 52CE 我爱测

Ubuntu precise (12.04.1 LTS) I'm rather new to PEAR. I installed PEAR. Then, using pear I installed phpdoc. It seems to be working great except for the graphing functions. I ran this command: /var/www/site5 $ phpdoc -f models/cla…

问题原文

原帖链接 · Buttle Butkus · CC BY-SA 3.0

Ubuntu precise (12.04.1 LTS)

I'm rather new to PEAR.

I installed PEAR. Then, using pear I installed phpdoc.

It seems to be working great except for the graphing functions.

I ran this command:

/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
$

I realized that in my apache virtual host for this site I had this line:

    php_value include_path ".:/var/www/site5/includes"

And so I thought maybe that was preventing inclusion of other directories... ?

So I tried changing the line to this:

    php_value include_path ".:/var/www/site5/includes:/usr/lib/php:/usr/share/php"

That didn't work either, so I finally commented out the line, but still the same error.

In case this helps, inside of /usr/share, I ran this command:

/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$

I don't see why this is not working. Thanks for your help.

已采纳解答

原帖链接 · Buttle Butkus · CC BY-SA 3.0

I tried installing it using PEAR.

sudo pear install Image_GraphViz

I ended up just upgrading (practically) EVERYTING and it worked.

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

Not sure what exactly did the trick, but it works now.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-02-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。