Today, when compiling and installing mysql from the source code under centos6.2, an egg error was reported when compiling mysql:
Copy the code code as follows:
[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
I later learned that this problem was because I directly used the cmake system to go back to the default /usr/bin to search, but the cmake installed in src was in /usr/local/bin, so of course I would not find this stuff. Solution:
1. Just make a link: ln -s /usr/local/bin/cmake /usr/bin
2. Directly use /usr/local/bin/cmake to compile.