我已经从一个星期尝试这个现在还无法找到这个答案时,我尝试这个sudo pecl install id3
这个错误发生
downloading id3-0.2.tgz ...
Starting to download id3-0.2.tgz (20,693 bytes)
.....done: 20,693 bytes
4 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 packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed
请帮忙 !!! 我已经安装PHP5-dev的。
http://php.net/manual/en/id3.installation.php
您需要先下载ID3使用:
pecl download id3-alpha
tar -zxvf id3*.tgz
vim id3.c
有在管线196来改变:function_entry id3_functions [] = {
成
一个zend_function_entry id3_functions [] = {
phpize
./configure
make
make test
make install
然后添加id3.so到php.ini文件并重新启动Apache
这是一个已知问题,请参阅https://bugs.php.net/bug.php?id=58650
经过试验,测试,证实了解决办法:
pear update-channels
pecl install --force id3
cd /build/buildd/php*/pear-build-download
tar -zxvf id3*.tgz
cd id3*/
phpize
./configure
make
make test
make install
添加id3.so
扩展您php.ini
文件:
nano /etc/php5/apache2/php.ini
喜欢:
extension=id3.so
在Dynamic Extensions
部分。
然后,重新启动apache
,以使新的配置可以加载:
service apache2 restart
确保一切顺利,没有出现错误,通过检查Apache的错误日志文件:
tail -25 /var/log/apache2/error.log
成功应该有一个类似的输出:
[notice] caught SIGTERM, shutting down
[notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured -- resuming normal operations