zoukankan      html  css  js  c++  java
  • 源码编译安装5.6.10

    [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

     

  • 相关阅读:
    GIthub的小技巧
    C#中DateTime格式转换
    流程控制: if分支 while循环 for循环
    注释,输入,格式化输出,数据类型,运算符
    计算机原理简单了解
    day30
    day19
    day18 时间:time:,日历:calendar,可以运算的时间:datatime,系统:sys, 操作系统:os,系统路径操作:os.path,跨文件夹移动文件,递归删除的思路,递归遍历打印目标路径中所有的txt文件,项目开发周期
    day17跨文件夹导入模块,模块的两种被执行方式,包,直接使用包中模块,包的管理
    day16模块,导入模板完成的三件事,起别名,模块的分类,模块的加载顺序,环境变量,from...import语法导入,from...import *,链式导入,循环导入
  • 原文地址:https://www.cnblogs.com/seasonsstory/p/3570895.html
Copyright © 2011-2022 走看看