博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
源码编译安装5.6.10
阅读量:5040 次
发布时间:2019-06-12

本文共 5707 字,大约阅读时间需要 19 分钟。

[root@localhost ~]# tar xf mysql-5.6.10.tar.gz

[root@localhost ~]# cd mysql-5.6.10

[root@localhost mysql-5.6.10]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDWITH_EXTRA_CHARSETS:STRING=all

-bash: cmake: command not found

[root@localhost mysql-5.6.10]#yum -y install cmake

[root@localhost mysql-5.6.10]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDWITH_EXTRA_CHARSETS:STRING=all

-- Running cmake version 2.6.4
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.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.6.10/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.6.10/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

yum -y install gcc gcc-c++

Complete!

[root@localhost mysql-5.6.10]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDWITH_EXTRA_CHARSETS:STRING=all
-- Running cmake version 2.6.4
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.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.6.10/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.6.10/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

上述问题时因为没有安装make

yum -y install make

安装后make 再次编译

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

CMake Error at cmake/readline.cmake:83 (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:193 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:325 (MYSQL_CHECK_READLINE)

-- Configuring incomplete, errors occurred!

yum -y install ncurses-devel

[root@localhost mysql-5.6.10]# yum -y install ncurses-devel

[root@localhost mysql-5.6.10]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDWITH_EXTRA_CHARSETS:STRING=all
-- Running cmake version 2.6.4
-- MySQL 5.6.10
-- Packaging as: mysql-5.6.10-Linux-i686
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:83 (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:193 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:325 (MYSQL_CHECK_READLINE)

-- Configuring incomplete, errors occurred!
[root@localhost mysql-5.6.10]# yum -y install libncurses5-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net
Setting up Install Process

移除CMakeCache.txt,重新编译

 

[root@localhost mysql-5.6.10]# service mysqld start

mysqld: unrecognized service
[root@localhost mysql-5.6.10]# find / -name mysqld_install_db
[root@localhost mysql-5.6.10]# find / -name mysql_install_db
/root/mysql-5.6.10/scripts/mysql_install_db
[root@localhost mysql-5.6.10]# /root/mysql-5.6.10/scripts/mysql_install_db --user=mysql
-bash: /root/mysql-5.6.10/scripts/mysql_install_db: Permission denied
[root@localhost mysql-5.6.10]# scripts/mysql_install_db --user=mysql
-bash: scripts/mysql_install_db: Permission denied
[root@localhost mysql-5.6.10]# ls -al scripts/mysql_install_db
-rw-r--r--. 1 root root 32588 Sep 18 05:26 scripts/mysql_install_db
[root@localhost mysql-5.6.10]# chmod +x scripts/mysql_install_db
[root@localhost mysql-5.6.10]# ls -al scripts/mysql_install_db
-rwxr-xr-x. 1 root root 32588 Sep 18 05:26 scripts/mysql_install_db
[root@localhost mysql-5.6.10]# scripts/mysql_install_db --user=mysql
-bash: scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory
[root@localhost mysql-5.6.10]#make install

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

 

 

 

 

 

转载于:https://www.cnblogs.com/seasonsstory/p/3570895.html

你可能感兴趣的文章
百度坐标(BD-09)、国测局坐标(火星坐标,GCJ-02)和WGS-84坐标互转
查看>>
pig自定义UDF
查看>>
输入名字显示其生日,没有则让输入生日,做记录
查看>>
爬虫综合大作业
查看>>
Kubernetes 运维学习笔记
查看>>
并查集 经典 畅通工程
查看>>
Spark MLlib 之 Naive Bayes
查看>>
php修改SESSION的有效生存时间
查看>>
spring security 11种过滤器介绍
查看>>
Hibernate一对多、多对一关联
查看>>
一、记录Git使用中遇到的问题及解决方法
查看>>
学习网址
查看>>
前端表格插件datatables
查看>>
内部类
查看>>
树链剖分入门
查看>>
图解算法时间复杂度
查看>>
UI_搭建MVC
查看>>
一个样例看清楚JQuery子元素选择器children()和find()的差别
查看>>
代码实现导航栏分割线
查看>>
Windows Phone开发(7):当好总舵主 转:http://blog.csdn.net/tcjiaan/article/details/7281421...
查看>>