web-dev-qa-db-ja.com

エラー-GraphVizパッケージの `dot`コマンドが見つかりません

Ubuntu正確(12.04.1 LTS)

私はPEARを初めて使用します。

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
$

このサイトのApache仮想ホストでは、次の行があることに気付きました。

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

そして、それが多分それが他のディレクトリの包含を妨げていると思った...?

だから私はこの行を次のように変更してみました:

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

それも機能しなかったので、最終的に行をコメントアウトしましたが、それでも同じエラーが発生します。

これが役立つ場合は、/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$

これが機能しない理由はわかりません。ご協力いただきありがとうございます。

19
Buttle Butkus

PEARでインストールしてみました。

Sudo pear install Image_GraphViz

結局、(実際には)すべてをアップグレードするだけで、うまくいきました。

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

トリックが正確に何をしたかはわかりませんが、現在は機能しています。

3
Buttle Butkus

「分析されたプロジェクトをアーティファクトに変換する」フェーズでPHPDocを生成するときに、この問題が発生しました。次のコマンドを実行してこの問題を解決しました

Sudo apt-get install graphviz
40
niekoost

非apt-getterの場合。

brew install graphviz

私のためにそれを整理し、PHPDocにも必要でした。

2
Atari

同じ問題がありました。 「ドット」がインストールされていることを確認する必要があります。

「ドット」はGraphVizに含まれています。次のリンクからインストールしてください

http://www.graphviz.org/Download.php

2
Anthony