执行如下命令下载解压MySQL8的源码文件压缩包到本地文件:

wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.13.tar.gz
tar -zxvf mysql-boost-8.0.13.tar.gz
[ -d ~/programs ] && mkdir programs
mv mysql-8.0.13 ~/programs/
cd ~/programs/mysql-8.0.13/
sudo apt-get install cmake bison libaio-dev openssl libssl-dev ncurses-dev -y
mkdir debug
cd debug

然后执行cmake命令:

cmake .. -DBUILD_CONFIG=mysql_release \
-DINSTALL_LAYOUT=STANDALONE \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_DTRACE=DFF \
-DWITH_EMBEDDED_SERVER=OFF \
-DWITH_INNODB_MEMCACHED=ON \
-DWITH_SSL=bundled \
-DWITH_ZLIB=system \
-DWITH_PAM=ON \
-DCMAKE_INSTALL_PREFIX=/var/mysql/ \
-DINSTALL_PLUGINDIR="/var/mysql/lib/plugin" \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EDITLINE=bundled \
-DFEATURE_SET=community \
-DCOMPILATION_COMMENT="MySQL Server (GPL)" \
-DWITH_DEBUG=OFF \
-DWITH_BOOST=../boost

运行成功的话,最后会显示:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/zifeiy/programs/mysql-8.0.13/debug

然后在debug目录运行:

make -j 24

进行编译。

编译好了之后,使用如下命令进行安装:

make install

上面是理论上没有问题的,但是我在进行到make -j 24这一步的时候就出现了问题了。

首先,虽然我的笔记本还不错,但是我同时开24个线程去跑在49%的时候,电脑卡死了~~

然后我就直接运行了make但是报错了:

[ 71%] Built target slave
[ 71%] Linking CXX executable ../../../runtime_output_directory/pfs_connect_attr-t
../../../storage/innobase/handler/ha_innodb.cc:18101: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:18099: 错误: 对‘btr_search_enable()’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:3376: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:3338: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4521: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4522: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4551: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:6227: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../archive_output_directory/libinnobase.a(ha_innodb.cc.o):ha_innodb.cc:mysql_sysvar_adaptive_hash_index_parts: 错误: 对‘btr_ahi_parts’未定义的引用
../../../archive_output_directory/libinnobase.a(ha_innodb.cc.o):ha_innodb.cc:mysql_sysvar_adaptive_hash_index: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innopart.cc:197: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/handler0alter.cc:6801: 错误: 对‘btr_drop_ahi_for_index(dict_index_t*)’未定义的引用
../../../storage/innobase/ibuf/ibuf0ibuf.cc:533: 错误: 对‘btr_search_info_create(mem_block_info_t*)’未定义的引用
../../../storage/innobase/page/page0page.cc:650: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/page/page0page.cc:793: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/page/page0zip.cc:2587: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/row/row0sel.cc:1585: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/row/row0sel.cc:1585: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/row/row0sel.cc:1549: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/row/row0sel.cc:1549: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/srv/srv0srv.cc:1316: 错误: 对‘btr_search_sys’未定义的引用
../../../storage/innobase/srv/srv0start.cc:3091: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/srv/srv0start.cc:3105: 错误: 对‘btr_search_sys_free()’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:778: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:1458: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:1216: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:2954: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:2572: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3077: 错误: 对‘btr_search_update_hash_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3458: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3713: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:4024: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:4617: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:2903: 错误: 对‘btr_search_update_hash_node_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:2905: 错误: 对‘btr_search_update_hash_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:787: 错误: 对‘btr_search_guess_on_hash(dict_index_t*, btr_search_t*, dtuple_t const*, unsigned long, unsigned long, btr_cur_t*, unsigned long, mtr_t*)’未定义的引用
../../../storage/innobase/include/btr0sea.ic:85: 错误: 对‘btr_search_info_update_slow(btr_search_t*, btr_cur_t*)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1331: 错误: 对‘btr_search_sys_create(unsigned long)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1854: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:2239: 错误: 对‘btr_search_enable()’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1854: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:2217: 错误: 对‘btr_search_sys_resize(unsigned long)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:236: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:236: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:783: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:2558: 错误: 对‘btr_search_info_get_ref_count(btr_search_t const*, dict_index_t const*)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:1301: 错误: 对‘btr_search_info_get_ref_count(btr_search_t const*, dict_index_t const*)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:2432: 错误: 对‘btr_search_info_create(mem_block_info_t*)’未定义的引用
../../../storage/innobase/fsp/fsp0fsp.cc:3432: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
collect2: error: ld returned 1 exit status
storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/build.make:215: recipe for target 'runtime_output_directory/pfs_connect_attr-t' failed
make[2]: *** [runtime_output_directory/pfs_connect_attr-t] Error 1
CMakeFiles/Makefile2:3396: recipe for target 'storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all' failed
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

暂时没有解决,先搁置一下,以后有机会再解决。

ubuntu 18.04下载mysql8.0.13源码并编译安装(暂时没有成功)的更多相关文章

  1. ubuntu13.04下载android4.0.1源码过程

    最初我参考的是老罗的博客http://blog.csdn.net/luoshengyang/article/details/6559955 进行下载安装的,但弄着弄着就发现不太对劲了.这里记录下详细过 ...

  2. Ubuntu12.04下载Android4.0.1源码全过程,附若干问题解决[转]

    学校里一直在做应用层开发,考虑到日后就业问题,这次决定研究源码和驱动,并进行编译.没想到就下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再下源码的人不要再走无谓的弯路了.事实 ...

  3. [2013.7.5新鲜出炉] Ubuntu12.04下载Android4.0.1源码全过程----------------折腾两天,终于下好,附若干问题解决

    本文转至 http://blog.csdn.net/yanzi1225627/article/details/9255457 下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再 ...

  4. 转载: ubuntu13.04下载android4.0.1源码过程

    转自:http://blog.csdn.net/zhanglongit/article/details/9263009,中间有些不行的地方进行了些小修改. 最初我参考的是老罗的博客http://blo ...

  5. CentOS 7.2使用源码包编译安装MySQL 5.7.22及一些操作

    CentOS 7.2使用源码包编译安装MySQL 5.7.22及一些操作 2018年07月05日 00:28:38 String峰峰 阅读数:2614   使用yum安装的MySQL一般版本比较旧,但 ...

  6. MySQL源码包编译安装

    +++++++++++++++++++++++++++++++++++++++++++标题:MySQL数据库实力部署时间:2019年3月9日内容:MySQL源码包进行编译,然后部署MySQL单实例重点 ...

  7. Ubuntu 18.04 下载地址

    http://mirrors.163.com/ubuntu-releases/18.04/

  8. Ubuntu 18.04 截图工具 Shutter(可以标记重点)-安装及使用

    Shutter 是一个功能丰富的屏幕截图程序.您可以屏幕的某个特定区域.特定的窗口. 或者是整个屏幕,甚至一整个网站截图.可以对截图应用各种效果,标记重点,然后上 传到一个图片托管网站——所有的任务在 ...

  9. Delphi XE7 Update1 下载破解、带源码和帮助安装序列号

    源:http://blog.csdn.net/tht2009/article/details/39157877 Delphi安装与破解 1.XE7 XE7Update1:http://altd.emb ...

随机推荐

  1. C# Apache Thrift Demo

    转载至 https://headsigned.com/posts/csharp-apache-thrift-demo/ This demo application shows how to imple ...

  2. LightOJ - 1336 - Sigma Function(质数分解)

    链接: https://vjudge.net/problem/LightOJ-1336 题意: Sigma function is an interesting function in Number ...

  3. flutter ListView 页面滚动组件

    ListView class A scrollable list of widgets arranged linearly. ListView is the most commonly used sc ...

  4. Kubernetes 学习9 Pod控制器

    一.Deployment 定义 1.简介 [root@k8smaster manifests]# kubectl explain deploy(也可以写作deployment) KIND: Deplo ...

  5. HTML5新增常用标签

    1.header 标签定义文档的页眉(介绍信息). <body> <article> <header> <h1>What Does WWF Do?< ...

  6. Oraclecloud创建时没有上传公钥的解决办法

    https://blogs.oracle.com/cloud-infrastructure/recovering-opc-user-ssh-key-on-oracle-cloud-infrastruc ...

  7. 44个Java性能优化

    44个Java性能优化 首先,代码优化的目标是: 减小代码的体积 提高代码运行效率 代码优化细节 1 .尽量指定类.方法的final修饰符 ​ 带有final修饰符的类是不可派生的.在Java核心AP ...

  8. go的flag模块使用例子

    package main import ( "flag" "fmt" "strconv" ) func main() { port := f ...

  9. iOS开发之如何在用户删除应用后保持一些数据

    在开发过程中我们有时候在用户删除时候保存一些信息在用户下次安装应用时候使用,这个时候我们可以使用剪切版UIPasteboard的FindUIPasteboard和钥匙串keychain的使用 剪切版剪 ...

  10. #C++初学记录(遍历)

    hide handkerchief Problem Description The Children's Day has passed for some days .Has you remembere ...