产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] 安装 fileinfo-1.0 环境LNMP安装fileinfo扩展失败。

INCHEL
铁牌会员
39.00 价值分

INCHEL 发表于 2019-11-06 11:52:53
错误如下:

=============================================================
[Linux] AMH 5.8
http://amh.sh

[fileinfo-1.0 admin]
=============================================================
[OK] fileinfo-1.0 is already installed.
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local/php-7.3
checking for PHP includes... -I/usr/local/php-7.3/include/php -I/usr/local/php-7.3/include/php/main -I/usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/in
clude/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php-7.3/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/php-7.3/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for fileinfo support... yes, shared
checking for strcasestr... yes
checking for utimes... yes
checking for strndup... yes
checking for ld used by cc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for /bin/ld option to reload object files... -r
checking for BSD-compatible nm... /bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
/bin/sh /tmp/fileinfo/libtool --mode=compile cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/p
hp -I/usr/local/php-7.3/include/php/main -I/usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib
-DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/fileinfo.c -o fileinfo.lo
mkdir .libs
cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/php -I/usr/local/php-7.3/include/php/main -I/
usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/fil
einfo.c -fPIC -DPIC -o .libs/fileinfo.o
/bin/sh /tmp/fileinfo/libtool --mode=compile cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/p
hp -I/usr/local/php-7.3/include/php/main -I/usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib
-DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/libmagic/apprentice.c -o libmagic/apprentice.lo
mkdir libmagic/.libs
cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/php -I/usr/local/php-7.3/include/php/main -I/
usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/lib
magic/apprentice.c -fPIC -DPIC -o libmagic/.libs/apprentice.o
virtual memory exhausted: Cannot allocate memory
make: *** [libmagic/apprentice.lo] Error 1
/bin/sh /tmp/fileinfo/libtool --mode=compile cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/p
hp -I/usr/local/php-7.3/include/php/main -I/usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib
-DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/libmagic/apprentice.c -o libmagic/apprentice.lo
cc -I/tmp/fileinfo/libmagic -I. -I/tmp/fileinfo -DPHP_ATOM_INC -I/tmp/fileinfo/include -I/tmp/fileinfo/main -I/tmp/fileinfo -I/usr/local/php-7.3/include/php -I/usr/local/php-7.3/include/php/main -I/
usr/local/php-7.3/include/php/TSRM -I/usr/local/php-7.3/include/php/Zend -I/usr/local/php-7.3/include/php/ext -I/usr/local/php-7.3/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/fileinfo/lib
magic/apprentice.c -fPIC -DPIC -o libmagic/.libs/apprentice.o
virtual memory exhausted: Cannot allocate memory
make: *** [libmagic/apprentice.lo] Error 1
mv: cannot stat '/usr/local/php-7.3/lib/php/extensions/no-debug-non-zts-20180731/fileinfo.so': No such file or directory
2019-11-06 11:52:53 1

amysql
创始人
16530.81 价值分

报错,virtual memory exhausted: Cannot allocate memory
服务器内存不足安装fileinfo。
  支持 (0分)  反对 (0分)
回复  2019-11-06 14:17:58 2

AMH面板 - 好用高效低占用、安全可靠极稳定

INCHEL
铁牌会员
39.00 价值分

引用:
amysql 发表于 2019-11-06 14:17:58
报错,virtual memory exhausted: Cannot allocate memory
服务器内存不足安装fileinfo。


服务器总内存 991 MB
空闲内存 792 MB 80%

nginx1.14 mysql5.5 php7.3

请问有其他解决办法安装 fileinfo 吗?
  支持 (0分)  反对 (0分)
回复  2019-11-06 16:38:48 3

amysql
创始人
16530.81 价值分

fileinfo安装使用的内存会比较多,只能给服务器增加内存,
或是加swap也行(速度相对比较慢)
  支持 (0分)  反对 (0分)
回复  2019-11-07 09:31:44 4

INCHEL
铁牌会员
39.00 价值分

登录SSH 创建1G大小SWAP
dd if=/dev/zero of=/swap bs=1024 count=1M
mkswap /swap
swapon /swap
echo "/swap swap swap sw 0 0" >> /etc/fstab
再在面板执行安装FILEINFO是不是就可以?
  支持 (0分)  反对 (0分)
回复  2019-11-07 11:05:24 5

shiguo
铝牌会员
410.08 价值分

swap会比较慢,需要添加swap的话,执行以下命令,2G大小

dd if=/dev/zero of=/swap bs=1M count=2048;
mkswap /swap;
swapon /swap;
echo "/swap swap swap defaults 0 0" >>/etc/fstab;
  支持 (2.37分)  反对 (-6.81分)
回复  2019-11-15 08:47:06 6

shiguo
铝牌会员
410.08 价值分

亲测1G内存,512swap,安装成功。
  支持 (3.04分)  反对 (0分)
回复  2019-11-15 08:47:57 7

lovem
银牌会员
2685.50 价值分

加swap,或升级内存,现在内存很便宜了
  支持 (0分)  反对 (0分)
回复  2019-11-18 22:06:58 8

gavin519
铁牌会员
197.34 价值分

我想加swap怎么加呢
  支持 (0分)  反对 (0分)
回复  2019-11-19 16:56:28 9

aduydgd
铝牌会员
217.19 价值分

我也会用到这个功能,一会尝试一下
  支持 (0分)  反对 (0分)
回复  2019-11-28 11:49:20 10

AMH铁粉,诸多面板转移过来的!

 1  (总1页)
AMH社区列表
用户服务中心