Home  >  Article  >  Database  >  centos下编译安装mysql报错解决_MySQL

centos下编译安装mysql报错解决_MySQL

WBOY
WBOYOriginal
2016-06-01 13:38:381370browse

CentOS

bitsCN.com


centos下编译安装mysql报错解决

 

今天在centos6.2下面源码编译安装mysql的时,在编译mysql的时候报了一个蛋蛋的错误:

     

Java代码  

[root@vps870 mysql-5.5.28]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql /    

> -DMYSQL_UNIX_ADDR=/tmp/mysql.sock /    

> -DDEFAULT_CHARSET=gbk /    

> -DDEFAULT_COLLATION=gbk_chinese_ci /    

> -DWITH_EXTRA_CHARSETS:STRING=gbk,gb2312,utf8 /    

> -DWITH_MYISAM_STORAGE_ENGINE=1 /    

> -DWITH_INNOBASE_STORAGE_ENGINE=1 /    

> -DWITH_READLINE=1 /    

> -DENABLED_LOCAL_INFILE=1 /    

> -DMYSQL_DATADIR=/var/mysql/data    

-bash: /usr/bin/cmake: No such file or directory    

 

 后面知道这个问题是因为直接使用cmake系统回到默认的/usr/bin中去寻找,但是src中安装的cmake是在/usr/local/bin中,所以当然不会找到这个东东啦。解决方法:

1、做一个链接即可:ln -s /usr/local/bin/cmake /usr/bin

2、直接使用/usr/local/bin/cmake进行编译。
 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn