xhprof failed to execute cmd: " dot -Tpng". stderr: `sh: dot: command not found '

安装graphviz



地址:http://www.graphviz.org/pub/graphviz/ARCHIVE/



下载安装



1

2

3

4

5

6

7

wget http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.28.0.tar.gz

 

tar xzvf graphviz-2.28.0.tar.gz

 

./configure --prefix=/home/mahao01/local/graphviz-2.28.0

 

make && make install

如果出现dot: command not found



改一下 : xhprof_lib/utils/callgraph_utils.php 中的 xhprof_generate_image_by_dot函数中的 $cmd



1

2

3

4

5

6

#改之前

$cmd = " dot -T".$type;

 

 

#改之后

 $cmd = " export LD_LIBRARY_PATH=/home/mahao01/local/graphviz/lib && /home/mahao01/local/graphviz/bin/dot -T"    .$type;

 

你可能感兴趣的:(command)