MySQL5.7.31编译安装时常见错误分析
【摘要】
1 没有安装MySQL所需要的boost库
测试发现编译MySQL5.7以及更高的版本时,都需要下载并引用或者直接安装boost库,否则在执行cmake命令时会报如下错误:
-- Running cmake version 3.2.1-- Configuring with MAX_INDEXES = 64U-- SIZEOF_VOI...
1 没有安装MySQL所需要的boost库
测试发现编译MySQL5.7以及更高的版本时,都需要下载并引用或者直接安装boost库,否则在执行cmake
命令时会报如下错误:
-
-- Running cmake version 3.2.1
-
-- Configuring with MAX_INDEXES = 64U
-
-- SIZEOF_VOIDP 8
-
-- MySQL 5.7.6-m16 [MySQL版本]
-
-- Packaging as: mysql-5.7.6-m16-Linux-x86_64
-
-- Looked for boost/version.hpp in and
-
-- BOOST_INCLUDE_DIR BOOST_INCLUDE_DIR-NOTFOUND
-
-- LOCAL_BOOST_DIR
-
-- LOCAL_BOOST_ZIP
-
-- Could not find (the correct version of) boost. [关键错误信息]
-
-- MySQL currently requires boost_1_57_0 [解决办法]
-
-
CMake Error at cmake/boost.cmake:76 (MESSAGE): [具体错误和解决方法]
-
You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>
-
-
This CMake script will look for boost in <directory>. If it is not there,
-
it will download and unpack it (in that directory) for you.
-
-
If you are inside a firewall, you may need to use an http proxy:
-
-
export http_proxy=http://example.com:80
-
-
Call Stack (most recent call first):
-
cmake/boost.cmake:228 (COULD_NOT_FIND_BOOST)
-
CMakeLists.txt:452 (INCLUDE)
-
-
-
-- Configuring incomplete, errors occurred!
-
See also "/mydata/mysql-5.7.6-m16/CMakeFiles/CMakeOutput.log".
解决方法:先下载Boost库,然后通过在cmake命令后面添加参数-DDOWNLOAD_BOOST=1 -DWITH_BOOST=Boost库路径
即可。
-
mkdir /usr/local/boost
-
cd /usr/local/boost
-
wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
-
tar zxvf boost_1_59_0.tar.gz
注意:如果在CMAKE的过程中有报错,当报错解决后,需要把源码目录中的CMakeCache.txt文件删除,然后再重新Cmake
文章来源: blog.csdn.net,作者:lxw1844912514,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/lxw1844912514/article/details/108491087
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)