Linux 下 MySQL 5.5.8 源码编译安装记录

2014-11-24 17:56:38 · 作者: · 浏览: 0

mysql源码文件:mysql-5.5.8.tar.gz


安装所需工具:cmake, GNU make, gcc, Perl, libncurses5-dev, bison(可选), chkconfig


注:
1.官方2010-11-18的源码有几处bug,在编译之前参照官方的说明,进行了手动修改。


官方说明链接:http://lists.mysql.com/commits/126782


2.官方5.5版本参考手册:http://dev.mysql.com/doc/


汗了一下,3392页的参考手册!


=>工具安装:


1. cmake


----没有自己编译安装cmake


----shell:~$ sudo apt-get install cmake


----版本:2.8.2


2. GNU make


----ubuntu自带


----版本:3.81


3.GCC


----ubuntu自带


----版本:4.4.5(官方文档:必须3.2以上)


4.Perl


----ubuntu自带


----版本:5.10.1


5.libncurses5-dev (ncurses-devel)


----若差了这个包,在cmake的时候会报错。


----shell:~$ sudo apt-get install libncurses5-dev


----报错信息


-- MySQL 5.5.8
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses library not found. Please install appropriate package,



remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu , package name is libncurses5-dev ,


on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (FIND_CURSES)
cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:256 (MYSQL_CHECK_READLINE)



-- Configuring incomplete, errors occurred!


---------------------------------