首页 > 代码库 > mysql配置文件夹错误:在安装mysql 5.6.19 时运行cmake命令是出现CMake Error: The source directory does not appear to contai

mysql配置文件夹错误:在安装mysql 5.6.19 时运行cmake命令是出现CMake Error: The source directory does not appear to contai

在安装mysql 5.5.xx 时运行cmake命令是出现CMake Error: The source directory does not appear to contain CMakeLists.txt.的错误,刚開始以为是cmake版本号有问题,到最后才发现是当前文件夹错了。

在运行cmake时没有切换到mysql的源代码文件夹导致了这个错误,切换到mysql的源代码文件夹又一次运行cmake命令就可以。

下面的命令在解压后的文件夹内运行下面命令:

cmake \
 -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
 -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
 -DDEFAULT_CHARSET=utf8 \
 -DDEFAULT_COLLATION=utf8_general_ci \
 -DWITH_INNOBASE_STORAGE_engine=1 \
 -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
 -DMYSQL_DATADIR=/data/mysqldb \
 -DMYSQL_TCP_PORT=3306 \
 -DENABLE_DOWNLOADS=1

mysql配置文件夹错误:在安装mysql 5.6.19 时运行cmake命令是出现CMake Error: The source directory does not appear to contai