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

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/work/local/graphviz
 
make && make install
# 如果出现dot: command not found 
# 改一下 : xhprof_lib/utils/callgraph_utils.php 中的 
# xhprof_generate_image_by_dot函数中的 $cmd 
#改之前 
$cmd = " dot -T".$type; 
#改之后 
$cmd = " export LD_LIBRARY_PATH=/home/work/local/graphviz/lib && /home/work/local/graphviz/bin/dot -T" .$type;

  

原文地址:https://www.cnblogs.com/allenhaozi/p/4508404.html