gpt4 book ai didi

在 Ubuntu(15.10) 中安装 php 扩展文件信息

转载 作者:行者123 更新时间:2023-12-04 18:46:24 27 4
gpt4 key购买 nike

我试图在 Ubuntu(15.10) 中安装 php fileinfo 扩展并得到错误:

sudo pecl install fileinfo

错误:
WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
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
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

然后我尝试了这个命令:
sudo apt-get install php5-dev

输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-dev is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic
linux-signed-image-4.2.0-16-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

如何安装 php fileinfo 扩展?
如何启用此扩展程序?

最佳答案

自 PHP 5.3.0 起默认启用此扩展。

在此之前,fileinfo 是一个 PECL 扩展,但不再在那里维护。

引用:
http://www.php.net/manual/en/fileinfo.installation.php

关于在 Ubuntu(15.10) 中安装 php 扩展文件信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36737792/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com