cmake报错

2 安装cmake软件包

yum install cmake

3 create account of mysql

groupadd mysql

useradd -g mysql mysql

autoreconf --force --install

libtoolize --automake --force

automake --force --add-missing

4  complie the sources

mkdir -p /data/mbdata

tar -xvf mysql-5.6.13.tar.gz

5 cmake

time cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql56 -DMYSQL_DATADIR=/data56 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR==/data56/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

[root@472322 mysql-5.6.13]# time cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql56 -DMYSQL_DATADIR=/data56 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR==/data56/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

-- Running cmake version 2.6.4
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-5.6.13/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-5.6.13/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!

real    0m0.017s

user    0m0.006s

sys     0m0.005s

6 上一步cmake报错了,google得知需要重新yum make下

yum install make

ok

再继续去cmake

[root@472322 mysql-5.6.13]# time cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql56 -DMYSQL_DATADIR=/data56 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR==/data56/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

-- Running cmake version 2.6.4

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.

CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:31 (MESSAGE):
  no suitable type found

Call Stack (most recent call first):

configure.cmake:621 (TEST_BIG_ENDIAN)

CMakeLists.txt:314 (INCLUDE)

这个错误很诡异,google上面有很多,但是每种情况都不同,我只好一个个去try了

-- Configuring incomplete, errors occurred!

报错如下: CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.

没有安装 gcc 和 gcc-c++,执行cmake报如上错误:

第一次尝试,执行
yum install -y gcc

yum install -y gcc-c++

7  继续cmake

time cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql56 -DMYSQL_DATADIR=/data56 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR==/data56/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:31 (MESSAGE):
  no suitable type found

Call Stack (most recent call first):

configure.cmake:621 (TEST_BIG_ENDIAN)

CMakeLists.txt:314 (INCLUDE)

-- Configuring incomplete, errors occurred!

第二次尝试,有人说需要安装至少5种包

[root@472322 mysql-5.6.13]#

yum install gcc gcc-c++

yum install -y ncurses-devel.x86_64

yum install -y cmake.x86_64

yum install -y libaio.x86_64

yum install -y bison.x86_64
yum install -y gcc-c++.x86_64

然后再cmake,还是报原来的错误

最后决定用土办法了,删除所有的已经安装过的,重新再来做一遍吧。

[解决办法]:删除原来的mysql-5.6.13目录,重新解压缩tar.gz包

rm -rf /root/mysql-5.6.13

cd /root/

tar -xvf mysql-5.6.13.tar.gz

cd /root/mysql-5.6.13

time cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql56 -DMYSQL_DATADIR=/data56 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR==/data56/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

OK,成功了,对linux底层不太熟悉,难道是因为前面没有事先安装好各种包而cmake出来错误的东西导致后面继续cmake就一直报错吗? 是否是需要准备好各种lib包然后才能yum install cmake呢?然后再安装mysql才能不报错呢?

8 build the db directy

time make

time make install

9 init db

ll /usr/local/mysql56/

cd /usr/local/mysql56/

chown -R mysql .

chgrp -R mysql .

cp support-files/my-default.cnf /etc/my56.cnf
scripts/mysql_install_db  --user=mysql --basedir=/usr/local/mysql56 --datadir=/data56 --defaults-file=/etc/my56.cnf
[root@472322 mysql56]# scripts/mysql_install_db  --user=mysql --basedir=/usr/local/mysql56 --datadir=/data56 --defaults-file=/etc/my56.cnf

/usr/local/mysql56/bin/mysqladmin -u root password ‘new-password‘

/usr/local/mysql56/bin/mysqladmin -u root -h 472322.ea.com password ‘new-password‘

Alternatively you can ru

--defaults-file argument to mysqld_safe when starting the server

感到信息有warning,那就重新再执行一遍,原来在做5.6.10安装测试的时候,init db不管第一次执行失败或者成功,都可以再执行第二

转自于:https://blog.csdn.net/u010098331/article/details/50924712

原文地址:https://www.cnblogs.com/rui517hua20/p/10420772.html

时间: 2024-10-15 07:52:08

cmake报错的相关文章

编译安装 mysql 5.5,运行 cmake报错Curses library not found

是因为 curses库没有安装,执行下面的语句即可 yum -y install ncurses-devel 如果上述命令的结果是no package,则使用下面的命令安装 apt-get install libncurses5-dev 再删除一下CMAKE的缓存配置文件 rm CMakeCache.txt 编译安装 mysql 5.5,运行 cmake报错Curses library not found

当CMAKE报错CMAKE_CXX_COMPILER找不到时...

碎碎念: 非常郁闷的在家里搭建MinGW+CMAKE环境,结果遇到了找不到CMAKE_CXX_COMPILER的问题,网上各种搜,居然没找到解法.折腾好一会,总算是解决了. 问题: MinGW+CMAKE环境下,configure时报错找不到CMAKE_CXX_COMPILER. 解决方法: 1.检查mingw里是否安装了GCC,G++等编译器.安装mingw时候貌似默认不会选择,如果跟我一样用的installer,那么手动选择一下,apply change就好了. 2.检查系统环境变量中是否设

centos7源码安装mysql时cmake报错

报错代码: CMake Error at cmake/boost.cmake:81 (MESSAGE):You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=解决办法:1.在/usr/local下创建一个名为boost的文件夹mkdir -p /usr/local/boost2.进入这个新创建的文件夹然后下载boostwget http://www.sourceforge.net/projects/boost/files/boost/1

centos7编译安装LNMP(nginx-1.16.0,mysql8.0.16,php-7.3.6)常见问题报错及解决方法

LNMP的安装与配置 nginx-1.16.0安装及配置: 第一步:前往官网下载nignx源码包 下载完毕后上传至服务器(先安装lrzsz) yum -y install lrzsz 安装完毕后执行: rz 找到nginx包后点击确定,即可上传成功 第二步: 解压: tar zxvf nginx-1.16.0.tar.gz 进入: cd nginx-1.16.0/ 创建用户.用户组: groupadd nginx useradd -g nginx nginx -s /sbin/nologin 第

./configure报错mv: cannot move './confsjjYiM/out' to 'cmake/Makefile': Permission denied

权限不足而报错: mv: cannot move './confsjjYiM/out' to 'cmake/Makefile': Permission denied config.status: error: could not create cmake/Makefile [email protected]:/usr/local/proj-4.9.1$ make Making all in src make[1]: 正在进入目录 `/usr/local/proj-4.9.1/src' make[

cmake的一个编译报错

在一台新搭建的服务器上执行cmake的时候,报了如下错误: $ cmake ./ -- The C compiler identification is unknown -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /u

mysql编译报错

1.make报错现象 Warning: Bison executable not found in PATH 解决办法 yum -y install bison 2.make报错现象 ake Error at /usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:17 (get_filename_component):get_filename_component called with incorrect number of argumen

Ubuntu12.04安装OpenCV报错及解决

安装环境:Ubuntu12.04 安装版本:OpenCV3.1.0 问题描述: $ cmake .. $ make 编译到21%时,报错“No rule to make target `/usr/lib/libz.so', needed by `lib/libopencv_core.so.” 问题解决: 1)查询资料,得知是软连接出了问题,需要用绝对路径重新建立软连接. 2)定位源文件在什么地方:$ locate libz.so 打印出如下两个: /usr/lib/libz.so /usr/li

CentOS 6.5 安装YouCompleteMe 报错汇总

支持折腾!!! 编译安装clang 3.6.0   编译器版本低 ====-----编译安装clang 3.6.0   编译器版本低---------------============== [[email protected] llvm-3.6.0]$ tar xf cfe-3.6.0.src.tar.xz  [[email protected] llvm-3.6.0]$ tar xf clang-tools-extra-3.6.0.src.tar.xz  [[email protected]