Ubuntu 11.10 下源码安装 mysql 5.5.20
问题:
??? CMAKE_CXX_COMPILER-NOTFOUN 问题的解决
?
写道
问题描述:
sudo cmake .后出现如下提示:
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND -- broken
CMake Error: The C++ compiler "CMAKE_CXX_COMPILER-NOTFOUND" is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring done
解决办法:
1. sudo apt-get install g++
2. cmake -D CMAKE_CXX_COMPILER="g++" CMAKE -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH="/usr/local" .
?
cmake 命令及参数,需要去掉换行
哦。
?
cmake .
-DCMAKE_INSTALL_PREFIX=/usr/mysql
-DMYSQL_DATADIR=/usr/mysql/data
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock
-DWITH_DEBUG=0
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DENABLED_LOCAL_INFILE=1
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_FEDERATED_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DMYSQL_TCP_PORT=3306
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
?
d
?
?