installing PECL id3 extension on Ubuntu

☆樱花仙子☆ 提交于 2019-12-13 02:00:55

问题


I have been trying this from a week now still couldnt find an answer for this when i try this sudo pecl install id3 this error happens

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

please help !!! I have already installed php5-dev.


回答1:


http://php.net/manual/en/id3.installation.php

You will need to download id3 first using:

pecl download id3-alpha
tar -zxvf id3*.tgz
vim id3.c 

Have to change in line 196: function_entry id3_functions[ ] = {

into

zend_function_entry id3_functions[ ] = {

phpize
./configure
make
make test
make install

Then add the id3.so into your php.ini file and restart apache




回答2:


This is a known issue, see https://bugs.php.net/bug.php?id=58650

Tried, tested, confirmed workaround:

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

Add the id3.so extension to your php.ini file:

nano /etc/php5/apache2/php.ini

like:

extension=id3.so

to the Dynamic Extensions section.

Then, restart apache so that the new configuration can be loaded:

service apache2 restart

ensure that everything went well and there are no errors, by checking the apache error log file:

tail -25 /var/log/apache2/error.log

Success should have a similar output:

[notice] caught SIGTERM, shutting down
[notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured -- resuming normal operations


来源:https://stackoverflow.com/questions/21103962/installing-pecl-id3-extension-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!