我试图运行sudo pecl安装apd,但我得到:
downloading apd-1.0.1.tgz ... Starting to download apd-1.0.1.tgz (36,643 bytes) ..........done: 36,643 bytes 15 source files,building running: PHPize Cannot find config.m4. Make sure that you run '/usr/bin/PHPize' in the top level source directory of the module If the command Failed with 'PHPize: not found' then you need to install PHP5-dev package. You can do it by running 'apt-get install PHP5-dev' as a root userERROR: `PHPize' Failed
我应该从某个目录运行这个命令吗?
这一次我尝试了打开的详细选项,以防日志中有一个线索:
sudo /usr/bin/pecl -vvvvv install apd
Warning: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.PHP on line 1518 Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.PHP on line 1528 Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.PHP on line 1528 Downloading "http://pecl.PHP.net/get/apd-1.0.1.tgz" downloading apd-1.0.1.tgz ... Starting to download apd-1.0.1.tgz (36,643 bytes + cp /tmp/pear/temp/tmpNUpEpz/apd-1.0.1/LICENSE /usr/share/PHP/doc/apd/.tmpLICENSE adding to transaction: chmod 664 /usr/share/PHP/doc/apd/.tmpLICENSE adding to transaction: rename /usr/share/PHP/doc/apd/.tmpLICENSE /usr/share/PHP/doc/apd/LICENSE adding to transaction: installed_as LICENSE /usr/share/PHP/doc/apd/LICENSE /usr/share/PHP/doc /apd + cp /tmp/pear/temp/tmpNUpEpz/apd-1.0.1/README /usr/share/PHP/doc/apd/.tmpREADME adding to transaction: chmod 664 /usr/share/PHP/doc/apd/.tmpREADME adding to transaction: rename /usr/share/PHP/doc/apd/.tmpREADME /usr/share/PHP/doc/apd/README adding to transaction: installed_as README /usr/share/PHP/doc/apd/README /usr/share/PHP/doc /apd + cp /tmp/pear/temp/tmpNUpEpz/apd-1.0.1/pprofp /usr/bin/.tmppprofp + chmod +x /usr/bin/.tmppprofp adding to transaction: chmod 775 /usr/bin/.tmppprofp adding to transaction: rename /usr/bin/.tmppprofp /usr/bin/pprofp adding to transaction: installed_as pprofp /usr/bin/pprofp /usr/bin / + cp /tmp/pear/temp/tmpNUpEpz/apd-1.0.1/pprof2calltree /usr/bin/.tmppprof2calltree + chmod +x /usr/bin/.tmppprof2calltree adding to transaction: chmod 775 /usr/bin/.tmppprof2calltree adding to transaction: rename /usr/bin/.tmppprof2calltree /usr/bin/pprof2calltree adding to transaction: installed_as pprof2calltree /usr/bin/pprof2calltree /usr/bin / 15 source files,building building in /tmp/pear/temp/pearf7LGca running: PHPize Cannot find config.m4. Make sure that you run '/usr/bin/PHPize' in the top level source directory of the module If the command Failed with 'PHPize: not found' then you need to install PHP5-dev packageYou can do it by running 'apt-get install PHP5-dev' as a root userrolling back 12 file operations + rm /usr/share/PHP/doc/apd/.tmpLICENSE + rm /usr/share/PHP/doc/apd/.tmpREADME + rm /usr/bin/.tmppprofp + rm /usr/bin/.tmppprof2calltree ERROR: `PHPize' Failed Warning: unlink(/tmp/glibctestRdKE0K): No such file or directory in System.PHP on line 214 Warning: unlink(/tmp/pear/temp/pearf7LGca): No such file or directory in System.PHP on line 214
首先不要启动它,如果你没有确保这两个:
>停用Zend平台或任何其他PHP优化器.一般来说,您需要禁用所有Zend扩展.
>安装调试启用的PHP版本(–enable-debug)
如果您有一个工作的PEAR设置,您需要像this文章一样设置APD.不要忘记尝试分发包.否则APD的构建如下:
>提取tarball.
>在tarball中更改目录.
>运行< apache root> / bin / PHPsize
>运行./configure(如果configure失败,则添加–with-PHP-config =< apache root> / bin / PHP-config)
>编译并安装所有使用
make make install
zend_extension=/apd.so apd.statement=1 apd.tracedir=/tmp/apd-traces
现在,您需要重新启动Apache,但在执行之前,请检查APD扩展是否正常.做简单的运行PHP
/bin/PHP
如果分机正确加载,不应给予警告.如果您收到类似“apd.so”扩展名的错误消息无法加载,则会出现问题.检查您是否编译了正确的Apache / PHP版本,并使用相同的权限.
如果PHP不抱怨任何事情输入:
<?PHP PHPinfo(); ?>
并检查一些关于APD的线路.如果你发现他们完成了.
您还需要一些跟踪,以便开始跟踪您需要使用Apache以允许PHP模块加载APD.接下来,您需要识别要跟踪的脚本.在脚本的顶部添加APD调用:
apd_set_pprof_trace();
然后再发出一些请求并再次删除该语句,以免造成进一步的损害.
现在看看跟踪目录.您应该找到具有pprof [0-9] *.[0-9]命名方案的文件.使用APD源压缩包中的pprofp工具解码它们.例:
/bin/PHP /pprofp -u
如果需要,重定向到stdout.使用-t代替-u(摘要输出)来获取调用树.当您使用-t创建跟踪时,也会收到摘要输出,但不包含每个呼叫持续时间.我建议始终创建一个调用树和一个汇总跟踪.
希望有帮助,我建议你几乎看不到上面提到的链接.
编辑: