系统内存问题
cc: internal compiler error: Killed (program cc1)
在 640M 内存的 vps 做编译的时候出现了上述错误.
几经搜索, 才发可能是系统没有交换分区, 编译过程中内存耗尽, 导致了编译中断 …
解决方式也很简单, 就是增加一个交换分区:
创建分区文件, 大小 2G
dd if=/dev/zero of=/swapfile bs=1k count=2048000
生成 swap 文件系统
mkswap /swapfile
激活 swap 文件
swapon /swapfile
这样就木有问题了, 但是这样并不能在系统重启的时候自动挂载交换分区, 这样我们就需要修改 fstab.
修改 /etc/fstab 文件, 新增如下内容:
/swapfile swap swap defaults 0 0
这样每次重启系统的时候就会自动加载 swap 文件了.
错误提示
configure: error: xml2-config not found. Please check your libxml2 installation.
错误介绍:提示是Please check your libxml2 installation.
其实是:没有安装 libxml2-devel
解决办法
安装 libxml2-devel
yum install -y libxml2-devel
错误提示
configure: error: cURL version 7.10.5 or later is required to compile php with cURL support
错误介绍:提示是curl 没有安装.
解决办法
安装 curl
yum install -y curl curl-devel
错误提示
configure: error: jpeglib.h not found.
错误介绍:提示是jpeglib.h没有找到.
原因是安装 gd 库生成 图片需要用的 jpeg png 等库。
解决办法
安装 libjpeg libjpeg-devel 还有个类似的 configure: error: png.h not found.
解决办法
yum install libjpeg libjpeg-devel libpng libpng-devel
错误提示
freetype-config not found.
错误介绍:提示是freetype-config没有找到.
安装 gd 库生成 图片需要用的 字体库。
解决办法
解决办法
yum install freetype-devel
错误提示
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
错误介绍:提示是libxslt版本没有达到要求.
解决办法
解决办法
yum install libxslt-devel
错误提示
checking for the location of zlib... /usr
configure: WARNING: ========================================================
configure: WARNING: Use of bundled libzip is deprecated and will be removed.
configure: WARNING: Some features such as encryption and bzip2 are not available.
configure: WARNING: Use system library and --with-libzip is recommended.
configure: WARNING: ========================================================
错误原因:好像是废弃之类的
错误提示
configure: WARNING: unrecognized options: --with-mcrypt, --enable-gd-native-ttf
说明上述这些参数废弃了
错误提示
ext/gd/libgd/.libs/gdkanji.o: In function `do_convert'
编辑 MakeFile
搜索 -lcrypt
在后面添加 -liconv
保存 ,继续编译即可
评论已关闭