Ошибка PHPDoc GraphViz не удалось выполнить команду fork и dot.

Я нашел здесь несколько связанных вопросов, но все они, кажется, решаются путем установки отсутствующего графика. В моем случае это, безусловно, установлено и в пути.

Ошибка из PHPDoc:

 Execute transformation using writer "Graph"PHP Warning:  exec(): Unable to fork [dot -V 2>&1] in     /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Graphs/Writer/Graph.     php on line 254
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpdoc:0
PHP   2. phpDocumentor\Application->run() /usr/bin/phpdoc:24
PHP   3. Symfony\Component\Console\Application->run() /usr/share/php/phpDocumentor/src/phpDocumentor/Application.php:183
PHP   4. Symfony\Component\Console\Application->doRun() /usr/share/php/phpDocumentor/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   5. Symfony\Component\Console\Application->doRunCommand() /usr/share/php/phpDocumentor/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /usr/share/php/phpDocumentor/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. phpDocumentor\Command\Project\RunCommand->execute() /usr/share/php/phpDocumentor/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
PHP   8. Symfony\Component\Console\Command\Command->run() /usr/share/php/phpDocumentor/src/phpDocumentor/Command/Project/RunCommand.php:275
PHP   9. phpDocumentor\Transformer\Command\Project\TransformCommand->execute() /usr/share/php/phpDocumentor/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
PHP  10. phpDocumentor\Console\Output\Output->writeTimedLog() /usr/share/php/phpDocumentor/src/phpDocumentor/Transformer/Command/Project/TransformCommand.php:206
PHP  11. call_user_func_array:{/usr/share/php/phpDocumentor/src/phpDocumentor/Console/Output/Output.php:59}() /usr/share/php/phpDocumentor/src/phpDocumentor/Console/Output/Output.php:59
PHP  12. phpDocumentor\Transformer\Transformer->execute() /usr/share/php/phpDocumentor/src/phpDocumentor/Console/Output/Output.php:59
PHP  13. phpDocumentor\Transformer\Transformer->transformProject() /usr/share/php/phpDocumentor/src/phpDocumentor/Transformer/Transformer.php:141
PHP  14. phpDocumentor\Transformer\Transformer->applyTransformationToProject() /usr/share/php/phpDocumentor/src/phpDocumentor/Transformer/Transformer.php:275
PHP  15. phpDocumentor\Plugin\Graphs\Writer\Graph->transform() /usr/share/php/phpDocumentor/src/phpDocumentor/Transformer/Transformer.php:312
PHP  16. phpDocumentor\Plugin\Graphs\Writer\Graph->processClass() /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Graphs/Writer/Graph.php:58
PHP  17. phpDocumentor\Plugin\Graphs\Writer\Graph->checkIfGraphVizIsInstalled() /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Graphs/Writer/Graph.php:72
PHP  18. exec() /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Graphs/Writer/Graph.php:254
Unable to find the `dot` command of the GraphViz package. Is GraphViz correctly installed and present in your path?  32.682s

Я знаю, что Graphiz установлен и присутствует на моем пути, потому что:

~ $ dot -v

 dot - graphviz version 2.36.0 (20140111.2315)
libdir = "/usr/lib/graphviz"Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/usr/lib/graphviz/config6
was successfully loaded.
render :  cairo dot fig gd map pic pov ps svg tk vml vrml xdot
layout :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp        twopi
textlayout :  textlayout
device :  canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf pic plain plain-ext png pov ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xdot1.2 xdot1.4 xlib
loadimage  :  (lib) eps gd gd2 gif jpe jpeg jpg png ps svg xbm

Кроме того, если я запускаю phpdoc как sudo, он работает просто отлично. Вышеуказанная ошибка появляется только когда я запускаю PHPDoc как пользователь. Чтобы заставить его работать в моей конкретной ситуации, мне нужно, чтобы он работал как пользователь.

Я не могу не думать, что в данном конкретном случае проблема больше связана с «неспособностью к форк», чем с «неспособностью найти команду точки». Но не уверен, как решить эту конкретную проблему.

Некоторая другая, возможно, полезная информация:

 Ubuntu 14.04
PHP 5.5.33
phpDocumentor version 2.8.5

total    used   free    shared    buffers   cached
Mem:           992      512    479     9         55        319

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …