啥,编译redis6.0.6的时候爆了……struct redisServer错误

1,307 阅读1分钟

前言

点赞在看,养成习惯。

点赞收藏,人生辉煌。

点击关注【微信搜索公众号:编程背锅侠】,防止迷路。

编译redis源码

命令

[root@emooco redis-6.0.6]# make

图解

在这里插入图片描述
在这里插入图片描述

原因

安装6版本的redis,gcc版本一定要5.3以上,centos6.6默认安装4.4.7;centos7.5.1804默认安装4.8.5,这里要升级gcc了。

查看gcc版本

命令

[root@emooco redis-6.0.6]# gcc -v

图解

在这里插入图片描述
在这里插入图片描述

升级gcc版本

命令

[root@emooco redis-6.0.6]# yum -y install centos-release-scl && yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils && scl enable devtoolset-9 bash

图解

在这里插入图片描述
在这里插入图片描述

查看当前gcc的版本

命令

[root@emooco bin]# gcc -v

图解

在这里插入图片描述
在这里插入图片描述

重新编译源码

命令

[root@emooco redis-6.0.6]# make

图解

在这里插入图片描述
在这里插入图片描述

谢谢点赞

  • 创作不易, 非常欢迎大家的点赞、评论和关注(^_−)☆
  • 你的点赞、评论以及关注是对我最大的支持和鼓励
  • 是我继续创作高质量博客的动力== !!!==