mysql 5.7.17 编译报错

make[2]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/merge_small_tests.cc.o] Error 4
make[1]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/all] Error 2
make: *** [all] Error 2

make过程中报以下错误!!!

[ 75%] Building CXX object sql/CMakeFiles/sqlgunitlib.dir/filesort_utils.cc.o
[ 75%] Building CXX object sql/CMakeFiles/sqlgunitlib.dir/mdl.cc.o
[ 75%] Building CXX object sql/CMakeFiles/sqlgunitlib.dir/sql_list.cc.o
[ 75%] Building CXX object sql/CMakeFiles/sqlgunitlib.dir/__/sql-common/sql_string.cc.o
[ 75%] Building CXX object sql/CMakeFiles/sqlgunitlib.dir/thr_malloc.cc.o
Linking CXX static library ../archive_output_directory/libsqlgunitlib.a
[ 75%] Built target sqlgunitlib
Scanning dependencies of target merge_small_tests-t
[ 75%] Building CXX object unittest/gunit/CMakeFiles/merge_small_tests-t.dir/merge_small_tests.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
make[2]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/merge_small_tests.cc.o] Error 4
make[1]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/all] Error 2
make: *** [all] Error 2

一番后折腾 发现内存不够 swap分区也不够

解决方案:

[root@VM_0_7_centos mysql-5.7.26]# dd if=/dev/zero of=/swapfile bs=1k count=2048000
[root@VM_0_7_centos mysql-5.7.26]# mkswap /swapfile
[root@VM_0_7_centos mysql-5.7.26]# swapon /swapfile

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容