Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpDocumentor - Unable to find the dot command of the GraphViz package

I would like ask some help about my next problem: I am working on a Symfony2 project. We installed Symfony2 via composer. Now I would like to generate phpDocument used by phpDocumentor.

A did the following steps:

  1. update composer: sudo php composer.phar self-update
  2. add the following property to Symfony2/compose.json file:

    "require-dev": {
        "phpdocumentor/phpdocumentor": "2.*@dev"
    },
    
  3. Run composer command

    sudo php composer.phar update
    

Result was success! The installed GraphViz version is: 1.0.2

When I try to generate phpDoc from source code finally I got a message: Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path? (Document generated as right...)

I tried to found a soulution about this problem but I couldn't.
Is anybody can help me to resolve this problem?

Environment is: Ubuntu release 12.04

like image 785
aBanhidy Avatar asked May 14 '14 13:05

aBanhidy


5 Answers

Graphviz is a nice software that creates graphs, but PHP software can only provide wrappers that create Graphviz source files that then get parsed and morphed into pictures.

Phpdocumentor comes with it's own wrapper, but you still have to install the Graphviz software package.

like image 177
Sven Avatar answered Oct 24 '22 08:10

Sven


On Ubuntu just run

sudo apt-get install graphviz

rerun phpdoc, at the end you will see the line

Execute transformation using writer "Graph"

that's all!

like image 41
Domenico Campagnolo Avatar answered Oct 24 '22 06:10

Domenico Campagnolo


The error says that : GraphViz tool (needed for making charts and graphs in the documentation) is not installed, in that scenario you will have to download the suitable version and configure it ! And if you are sure that it is installed on your system, then you should check whether the command dot is available or not. On windows path environment variable needs to be set which makes the dot command execution to be available from any path. Fixing this may get your things working !

like image 42
Rahul Gupta Avatar answered Oct 24 '22 08:10

Rahul Gupta


For Windows

Follow the steps below to resolve this error are:

  1. download Windows Packages from https://graphviz.gitlab.io/_pages/Download/Download_windows.html
  2. Just install it

  3. add c:\Program Files\Graphviz*\dot.exe or c:\Program Files (x86)\Graphviz*\dot.exe to your environment variable PATH

  4. run phpdoc

  5. Re-start your machine & run phpdoc (if still shows the same error message)

like image 2
Shafiq Avatar answered Oct 24 '22 07:10

Shafiq


For windows 7/10 just install https://graphviz.gitlab.io/download/ select the Stable install packages. Then add

C:\Program Files (x86)\Graphviz2.38\bin

to your system environment variables. Make sure to change the version to the one you downloaded.

To check if it works open a new instance of cmd or git bash and run dot. If it says dot is not a valid command then make sure the path to Graphviz bin folder is correct.

like image 1
Cylosh Avatar answered Oct 24 '22 06:10

Cylosh