VPS侦探论坛

 找回密码
 注册
查看: 7604|回复: 11

安装程序提示 The fileinfo extension is required.

[复制链接]
发表于 2015-9-16 13:44:46 | 显示全部楼层 |阅读模式

该怎么修改 PHP.INI 怎么修改后生效啊 军哥
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-9-16 13:52:27 | 显示全部楼层


好像在论坛搜到方法了 我试试看
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-9-16 14:11:58 | 显示全部楼层

好像还是没操作好 求详细方法
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-9-16 15:12:00 | 显示全部楼层



fileinfo默认是没有的需要自己参考 https://www.vpser.net/manage/lnmp-php-install-ext.html 这个照葫芦画瓢
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-9-16 15:17:52 | 显示全部楼层

好的 我试试 谢谢军哥

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2015-9-17 16:43:48 | 显示全部楼层

fileinfo 这个参数究竟能不能用 怎么开始的时候 --disable-fileinfo 是怎么回事



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2015-9-17 20:27:55 | 显示全部楼层

该模块是一个很挑剔的模块,在1G一下内存的情况下,很容易因为内存过小而造成php无法安装上
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-9-20 12:19:34 | 显示全部楼层

1.在 putty 里执行下列命令

cd /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

2.由于不懂 linux 我用FTP下载 php.ini 这个文件,然后用 editplus 编辑了一下 再上传回去

/usr/local/php/etc/php.ini

找到 ";extension=php_bz2.dll" 这一行
在其上面添加一行:
extension = fileinfo.so

3.最后执行

/etc/init.d/php-fpm restart

[ 本帖最后由 cute2008 于 2015-9-20 12:30 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-11-24 19:44:33 | 显示全部楼层


我的到make && make install执行之后就报错,,,/bin/bash /root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/libtool --mode=compile cc -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/libmagic -I. -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo -DPHP_ATOM_INC -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/include -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/main -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/libmagic/apprentice.c -o libmagic/apprentice.lo
cc -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/libmagic -I. -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo -DPHP_ATOM_INC -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/include -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/main -I/root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp1.2-full/src/php-5.6.9/ext/fileinfo/libmagic/apprentice.c  -fPIC -DPIC -o libmagic/.libs/apprentice.o
virtual memory exhausted: Cannot allocate memory
make: *** [libmagic/apprentice.lo] Error 1


我的是1G内存啊 php5.6.9 ubantu14
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-11-24 19:52:17 | 显示全部楼层

回复 9# 的帖子




已经明显的提示你内存不够用了
吧其他nginx、mysql等等其他非必须进程都kill掉再编译,不是你有1G就能用1G,也不少1G就一定能安装上
不行就只能加swap或升级内存了
发表于 2016-1-24 16:55:39 | 显示全部楼层

这是什么意思


[root@localhost fileinfo]# make && make install
/bin/sh /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/libtool --mode=install cp ./fileinfo.la /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/modules
cp ./.libs/fileinfo.so /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/modules/fileinfo.so
cp ./.libs/fileinfo.lai /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/modules/fileinfo.la
PATH="$PATH:/sbin" ldconfig -n /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/lnmp1.2-full/src/php-5.5.25/ext/fileinfo/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
发表于 2016-1-24 20:08:12 | 显示全部楼层

回复 11# 的帖子


编译安装成功,php.ini里再加上就行了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 21:20 , Processed in 0.030000 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表