安装PHP的fileinfo扩展失败

时间:2014-12-06 13:31:35

标签: php

我遵循了本教程:

$ apt-get install php-pear php5-dev libmagic-dev
$ pecl install fileinfo
$ sudo echo "extension=fileinfo.so" > /etc/php5/fileinfo.ini
$ sudo apachectl restart

但是当我运行它时,它说失败的消息:

root@111:~/mine/Fileinfo-1.0.4# pecl install fileinfo
WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
WARNING: php_bin /alidata/server/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Cannot find config.m4.
Make sure that you run '/alidata/server/php/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

这是我的机器信息:

root@111:~/mine/Fileinfo-1.0.4# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:    12.04
Codename:   precise

这是我的PHP版本信息:

root@111:~/mine/Fileinfo-1.0.4# php --version
PHP 5.4.27 (cli) (built: Jun 12 2014 22:20:06) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

0 个答案:

没有答案