linux fileinfo 安装失败提示
cc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [Makefile:216: libmagic/apprentice.lo] Error 1
解决方案如下
我们来增加虚似内存
[root@ip-172-31-23-8 fileinfo]# free -m
total used free shared buff/cache available
Mem: 949 195 643 0 111 629
Swap: 1024 207 817
[root@ip-172-31-23-8 fileinfo]# mkdir /opt/images/
[root@ip-172-31-23-8 fileinfo]# rm -rf /opt/images/swap
[root@ip-172-31-23-8 fileinfo]# dd if=/dev/zero of=/opt/images/swap bs=1024 count=2048000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 14.2634 s, 147 MB/s
[root@ip-172-31-23-8 fileinfo]# mkswap /opt/images/swap
mkswap: /opt/images/swap: insecure permisions 0644, fix with: chmod 0600 /opt/images/swap
Setting up swapspace version 1, size = 2 GiB (2097147904 bytes)
no label, UUID=6944cd95-4f66-4ac1-a738-6b3733f6ea9f
[root@ip-172-31-23-8 fileinfo]# swapon /opt/images/swap
swapon: /opt/images/swap: insecure permisions 0644, 0600 suggested.
现在我们再查看SWAP是否生效
[root@ip-172-31-23-8 fileinfo]# free -m
total used free shared buff/cache available
Mem: 949 173 68 0 706 632
Swap: 3024 205 2819
此时我们看到内存2G了
执行
/www/server/php/83/bin/phpize
重新安装
./configure --with-php-config=/usr/local/php/bin/php-config (注意等号后面的为你自己的php-config的地址 php-config是一个文件)
make && make install
已安装成功了
Installing shared extensions: /www/server/php/83/lib/php/extensions/no-debug-non-zts-20230831/