1.若make出现类似错误:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
表明make未安装,执行:sudo apt-get install -y make
参见: Mysql 错误以及解决办法
2.如果make到63%左右出现错误:
make[2]: *** [storage/perfschema/unittest/pfs_connect_attr-t] Error 1
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
则:cmake去掉-DWITH_PARTITION_STORAGE_ENGINE=1参数重新编译
3.MySQL启动报错:
[ERROR] InnoDB: The system tablespace must be writable!
[ERROR] Plugin 'InnoDB' init function returned error.
则:rm -rf /usr/local/mysql/data/ib_logfile*
编译参数及安装过程: Linux源码安装mysql 5.6.12 (cmake编译)
4.其他错误: Ubuntu 12 下的Mysql 5.5的 cmake 源码编译安装
5.编译错误:configure: error: No curses/termcap library found
查找文件系统:find / -name libncursesw*
如果找到则重新编译并加上以下参数:
--with-named-curses-libs=/lib/i386-linux-gnu/libncursesw.so.5.9
或者安装libncurses5-dev包:
sudo apt-cache search libncurses5 && sudo apt-get install -y libncurses5-dev
参考:http://younglab.blog.51cto.com/416652/136495
http://www.blogjava.net/wady/articles/294097.html
6.make出现错误:collect2: ld returned 1 exit status
尝试如下解决方案:
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -f build-essential libncurses5-dev libncurses5
https://my.oschina.net/cwalet/blog/180107