bitscn.com
安装mysql5.5时常见错误--缺失make
首先我这是一台centos release 6.2 (final),新安装的系统,没有任何软件及库文件。安装mysql5.5之前,先需要大概了解一下,需要注意的信息,mysql5.5的安装与其它版本不同的是编译安装时,需要用到cmake,所以做如下操作:
1.yum install gcc* c++ * autoconf automake zlib* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*安装系统所需要的库文件
2.安装cmake工具。yum install cmake*
3.由于我这个系统是新安装的没有任何软件,所以如果用yum install cmake*安装成功后,到安装mysql时会出现如下错误,请看:
[root@localhost mysql]# cd mysql-5.5.25a
[root@localhost mysql-5.5.25a]# cmake -dcmake_install_prefix=/usr/local/mysql -dmysql_unix_addr=/data/mysql/mysql.sock -ddefault_charset=utf8 -ddefault_collation=utf8_general_ci -dwith_extra_charsets:string=utf8,gbk -dwith_myisam_storage_engine=1 -dwith_innobase_storage_engine=1 -dwith_memory_storage_engine=1 -dwith_readline=1 -denabled_local_infile=1 -dmysql_datadir=/data/mysql -dmysql_user=mysql -dmysql_tcp_port=3306
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/mysql-5.5.25a/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/mysql-5.5.25a/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!
大概的意思就是说cmake没有安装好,我明明用yum install cmake*安装好了呀?后来yum install make 后,[root@localhost mysql-5.5.25a]# yum install make
loaded plugins: fastestmirror
loading mirror speeds from cached hostfile
setting up install process
resolving dependencies
--> running transaction check
---> package make.i686 1:3.81-20.el6 will be installed
--> finished dependency resolution
dependencies resolved
================================================================================
package arch version repository size
================================================================================
installing:
make i686 1:3.81-20.el6 base 386 k
transaction summary
================================================================================
install 1 package(s)
total download size: 386 k
installed size: 1.0 m
is this ok [y/n]: y
downloading packages:
make-3.81-20.el6.i686.rpm | 386 kb 00:01
running rpm_check_debug
running transaction test
transaction test succeeded
running transaction
installing : 1:make-3.81-20.el6.i686 1/1
installed:
make.i686 1:3.81-20.el6
complete!
bitscn.com