mysql 5.6.29.tar.gz_编译安装mysql5.6.29及安装报错的解决方法

1.安装必要的库文件

yum install -y gcc*

2.yum安装camke

yum install -y cmake

编译安装cmake

cd /usr/local/src

wget http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz

tar zxvf cmake-2.8.7.tar.gz

cd cmake-2.8.7

./configure

make

make install

3.安装 MYSQL

cd /usr/local/src

groupadd mysql

useradd -g mysql -M -s /sbin/nologin mysql

tar zxf mysql-5.6.29.tar.gz

cd mysql-5.6.29

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql -DDEFAULT_CHARSET=utf8  -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=all -DWITH_DEBUG=0 -DWITH_SSL=yes -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1

make && make install

cd /usr/local/mysql

chown -R mysql:mysql  /usr/local/mysql

./scripts/mysql_install_db --user=mysql  -datadir=/data/mysql

cp support-files/my-default.cnf /etc/my.cnf

cp support-files/mysql.server /etc/init.d/mysqld

bin/mysqld_safe --user=mysql &

/etc/init.d/mysqld start

错误1:-- Could NOT find Git (missing:  GIT_EXECUTABLE)

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.

CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

解决:

-- Could NOT find Git (missing:  GIT_EXECUTABLE)这项应该缺少git包,yum install -y git

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown 这两项缺少gcc和gcc-c++的包,yum install -y gcc gcc-c++

错误2:-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)

CMake Error at cmake/readline.cmake:85 (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:128 (FIND_CURSES)

cmake/readline.cmake:202 (MYSQL_USE_BUNDLED_EDITLINE)

CMakeLists.txt:409 (MYSQL_CHECK_EDITLINE)

-- Configuring incomplete, errors occurred!

解决:-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)

缺少ncurses-devel包,yum install -y ncurses-devel

删除CMakeCache.txt

file=find / -name CMakeCache.txt

rm -f $file

错误3:Warning: Bison executable not found in PATH

解决:

Warning: Bison executable not found in PATH  缺少Bison,yum install -y bison

原文:http://11072323.blog.51cto.com/11062323/1745980

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值