在使用pecl安装apd的同时运行phpize时,找不到config.m4
我正在尝试访问
PHP中的rename_function,因此我需要PECL APD.我正在运行Ubuntu 14.04 LTS.
我试图运行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
这将是一个简短的总结,一切都是将APD作为PHP分析器运行的前提条件,我希望它能够帮助您的需求.此摘要适用于PHP 5.6.2 APD 1.0.1,并可能对其他版本不正确.
首先不要启动它,如果你没有确保这两个: >停用Zend平台或任何其他PHP优化器.一般来说,您需要禁用所有Zend扩展. 如果您有一个工作的PEAR设置,您需要像this文章一样设置APD.不要忘记尝试分发包.否则APD的构建如下: >提取tarball. make make install >编辑php.ini并添加至少 zend_extension=/apd.so apd.statement=1 apd.tracedir=/tmp/apd-traces >创建php.ini中指定的输出目录 现在,您需要重新启动Apache,但在执行之前,请检查APD扩展是否正常.做简单的运行PHP /bin/php 如果分机正确加载,不应给予警告.如果您收到类似“apd.so”扩展名的错误消息无法加载,则会出现问题.检查您是否编译了正确的Apache / PHP版本,并使用相同的权限. 如果PHP不抱怨任何事情输入: <?php phpinfo(); ?> 并检查一些关于APD的线路.如果你发现他们完成了. 您还需要一些跟踪,以便开始跟踪您需要使用Apache以允许PHP模块加载APD.接下来,您需要识别要跟踪的脚本.在脚本的顶部添加APD调用: apd_set_pprof_trace(); 然后再发出一些请求并再次删除该语句,以免造成进一步的损害. /bin/php /pprofp -u 如果需要,重定向到stdout.使用-t代替-u(摘要输出)来获取调用树.当您使用-t创建跟踪时,也会收到摘要输出,但不包含每个呼叫持续时间.我建议始终创建一个调用树和一个汇总跟踪. 希望有帮助,我建议你几乎看不到上面提到的链接. 编辑: phpize命令旨在在扩展源目录的顶层运行(此源目录应包含文件名config.m4).有关更多信息,请参阅this. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |