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

58,484

Solution 1

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.

Solution 2

I had this problem when generating PHPDoc, during the "Transform analyzed project into artifacts"-phase. I solved this problem by executing the following command

sudo apt-get install graphviz

Solution 3

For the non-apt-getters.

brew install graphviz

sorted it out for me, also needed it for PHPDoc.

Solution 4

I had the same issue. You'll need to make sure you have "dot" installed.

"dot" is included with GraphViz.

Share:
58,484

Related videos on Youtube

Buttle Butkus
Author by

Buttle Butkus

I'm doing Magento programming and "theming" and also some other php projects. I also do a lot of linux server admin and mysql db design and query writing. I'm soooo ready to help. SOreadytohelp

Updated on September 18, 2022

Comments

  • Buttle Butkus
    Buttle Butkus over 1 year

    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.

  • doub1ejack
    doub1ejack over 7 years
    Nice. I used macports, but same idea.