mysql8 源码编译 客户端连接运行 报段异常解决

发布时间:2024年01月15日

mysql8 源码编译 客户端连接运行 报段异常解决。解决方案:删除之前编译的文件。先安装libncurses-dev依赖,在重新编译。原因:第一次编译没有libncurses-dev依赖,编译告警,再次编译有缓存,没有引入声明头文件。根源是c语言 隐式声明函数。

如需要mysql8源码的编译简单教程

传送门mysql8 源码官方下载mysql8编译mysql8安装-CSDN博客

Program received signal SIGSEGV, Segmentation fault

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.1.0-debug

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Program received signal SIGSEGV, Segmentation fault

##gdb断点调试mysql8 源码编译的客户端连接报的Program received signal SIGSEGV, Segmentation fault异常错误

(gdb) r
Starting program: /home/yym/mysql8-install/mysql/bin/mysql -h127.0.0.1 -uroot -p -P3306
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=5, argv=0x7fffffffe238) at /home/yym/mysql8/mysql-8.1.0/client/mysql.cc:1278
1278    int main(int argc, char *argv[]) {
(gdb) c
Continuing.
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.1.0-debug

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Program received signal SIGSEGV, Segmentation fault.
0x000055555581cf74 in terminal_alloc (el=0x555555fb7fd0, t=0x555555b8d2c0 <tstr>, cap=0x55eff7bf <error: Cannot access memory at address 0x55eff7bf>) at /home/yym/mysql8/mysql-8.1.0/extra/libedit/libedit-20210910-3.1/src/terminal.c:346
346             if (cap == NULL || *cap == '\0') {

文章来源:https://blog.csdn.net/u014200244/article/details/135608266
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。