- 第一步安装mysql过程
- 安装包mysql-5.0.22.tar.gz,解压tar -zxvf mysql-5.0.22.tar.gz
- cd mysql-5.0.22
- 进行源码安装./configure --prefix=/usr/local/mysql
- 提示如下错误:
- configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
- configure: error: no acceptable C compiler found in $PATH
- 缺少gcc包,安装gcc:yum -y install gcc
- 再次源码安装mysql:./configure --prefix=/usr/local/mysql
- 提示:
- checking for termcap functions library... configure: error: No curses/termcap library found
- 缺少curses包:进行安装 yum -y install ncurses-devel
- 再次源码安装mysql:./configure --prefix=/usr/local/mysql
- 提示:Thank you for choosing MySQL!
- 进行编译:make && make install
- 提示:
../depcomp: line 512: exec: g++: not found
make[2]: *** [my_new.o] 错误 127
make[2]: Leaving directory `/tmp/mysql-5.0.22/mysys'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/tmp/mysql-5.0.22'
make: *** [all] 错误 2 - 缺少c++包:yum install -y gcc-c++
- 进行:make clean 再次:make && make install
- 提示:
../depcomp: line 99: exec: g++: not found
make[2]: *** [my_new.o] 错误 127
make[2]: Leaving directory `/tmp/mysql-5.0.22/mysys'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/tmp/mysql-5.0.22'
make: *** [all] 错误 2 - cd .. 删除mysql-5.0.22:rm -rf mysql-5.0.22
- 重新解压mysql-5.0.22.tar.gz: tar -zxvf mysql-5.0.22.tar.gz
- cd mysql-5.0.22,再次:./configure --prefix=/usr/local/mysql
- 进行编译:make && make install
- 提示:
make[4]: Nothing to be done for `install-data-am'.
make[4]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[4]: Leaving directory `/tmp/mysql-5.0.22/server-tools/instance-manager'
make[3]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[3]: Leaving directory `/tmp/mysql-5.0.22/server-tools/instance-manager'
make[3]: Entering directory `/tmp/mysql-5.0.22/server-tools'
make[4]: Entering directory `/tmp/mysql-5.0.22/server-tools'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/tmp/mysql-5.0.22/server-tools'
make[3]: Leaving directory `/tmp/mysql-5.0.22/server-tools'
make[2]: Leaving directory `/tmp/mysql-5.0.22/server-tools'
make[1]: Leaving directory `/tmp/mysql-5.0.22' - 检查时间:2015年 11月 14日 星期六 23:25:23 CST
- 修改时间:
[root@localhost tmp]# date -s 2016/09/19
2016年 09月 19日 星期一 00:00:00 CST
[root@localhost tmp]# date -s 22:01:11
2016年 09月 19日 星期一 22:01:11 CST - 再次:./configure --prefix=/usr/local/mysql
- 然后:make && make install
来源:https://www.cnblogs.com/powpoia/p/5886729.html