linux安装redis时报collect2: fatal error: cannot find 'ld'和In file included from adlist.c:34:0:
如题,看了下该ld命令所在文件:
[root@centos redis-4.0.]# whereis ld
ld: /usr/bin/ld.gold /usr/bin/ld /usr/bin/ld.bfd /usr/share/man/man1/ld..gz
发现ld是一个软连接,而且该软连接一直在闪烁:
[root@centos redis-4.0.]# ll /usr/bin/ld*
lrwxrwxrwx. root root Mar /usr/bin/ld -> /etc/alternatives/ld
-rwxr-xr-x. root root Aug /usr/bin/ld.bfd
-rwxr-xr-x. root root Aug /usr/bin/ldd
-rwxr-xr-x. root root Aug /usr/bin/ld.gold
到该软连接目录下,发现软连接失效,已不存在ld:
[root@centos redis-4.0.]# cd /etc/alternatives/
[root@centos alternatives]# ll
total
解决:换个好的环境,发现原来该软连接是指向/usr/bin/ld.bfd
[root@centosalternatives]# ll
total
lrwxrwxrwx root root May : ld -> /usr/bin/ld.bfd
回到失败环境/etc/alternatives目录,创建软连接:
[root@centos alternatives]# touch ld
[root@centos alternatives]# ln -s /usr/bin/ld.bfd ld
[root@centos alternatives]# ll /usr/bin/ld*
lrwxrwxrwx. root root Mar /usr/bin/ld -> /etc/alternatives/ld
-rwxr-xr-x. root root Aug /usr/bin/ld.bfd
-rwxr-xr-x. root root Aug /usr/bin/ldd
-rwxr-xr-x. root root Aug /usr/bin/ld.gold
现在软连接不闪了,再次编译redis,出来另一个提示:
[root@centos redis-4.0.]# make
cd src && make all
make[]: Entering directory `/root/redis/redis-4.0./src'
CC Makefile.dep
make[]: Leaving directory `/root/redis/redis-4.0./src'
make[]: Entering directory `/root/redis/redis-4.0./src'
CC adlist.o
In file included from adlist.c:::
zmalloc.h::: fatal error: jemalloc/jemalloc.h: No such file or directory
#include <jemalloc/jemalloc.h>
^
compilation terminated.
make[]: *** [adlist.o] Error
make[]: Leaving directory `/root/redis/redis-4.0./src'
make: *** [all] Error
编译命令使用如下语句,改变redis的分配器即可:
[root@centos redis-4.0.]# make MALLOC=libc
linux安装redis时报collect2: fatal error: cannot find 'ld'和In file included from adlist.c:34:0:的更多相关文章
- linux下编译时遇到fatal error: openssl/sha.h: No such file or directory怎么办?
答:安装ssl开发库 ubuntu下的安装方法为: sudo apt-get install libssl-dev -y
- ././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory 解决办法
我在编写内核驱动模块的时候报了一个非常奇怪的错误,如下图: 在目录下看了一下确实没有发现这个文件,感觉很奇怪,因为我记得之前编译模块是没有错误的,所以不可能是我代码写的有问题. 查阅了资料很多说要清除 ...
- Centos7 linux 安装 redis 遇到的几个问题
环境:centos7 + redis 5.0 解决方案仅供参考,如不能解决问题,请查找请他方案. 1.不能编译没有GCC 编译工具 make报错: make[1]: [persist-set ...
- Linux安装redis数据库及添加环境变量
1.下载安装包 [root@localhost opt]# yum install wget [root@localhost opt]# wget http://download.redis.io/r ...
- 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
[Redis]编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory 在安装redis进行编译 ...
- Linux安装Redis 6.0.5 ./install_server.sh报错
Linux安装Redis 6.0.5 ./install_server.sh报错 linux 安装Redis6.0.5时 进行到./install_server.sh时报错, This systems ...
- Linux安装redis服务器
Linux安装redis服务器 初次接触,这里简单的说下我遇到的情况以及安装方法,当然也是参考了诸位大神的. 确定虚拟机的主机IP. 1)首先需要一个linux虚拟机,确定虚拟机的ip ,输入命令:# ...
- Linux 安装Redis<准备>(使用Mac远程访问)
阅读本文需要一定的Linux基础 一 Redis简介 redis是用c语言编写的一款开源的高性能键值对(key-value)数据库 它通过提供多种键值数据类型来适应不同场景下的存储需求 二 Redis ...
- 1.Linux安装redis
Linux安装redis 操作系统是Centos7 1.下载压缩包 2.解压 3.编译 4.启动redis 5.设置redis.conf和防火墙端口开放,外网可以访问 1.下载压缩包 下载地址:htt ...
随机推荐
- Fedora 29 安装 GitBook 教程
Fedora 29 安装 GitBook 教程 本文原始地址:https://sitoi.cn/posts/53731.html 安装 nvm 安装 nvm curl -o- https://raw. ...
- vue.js集成codeMirror代码编辑器
1.前端代码 <link href="https://cdn.bootcss.com/codemirror/5.48.4/codemirror.css" rel=" ...
- Centos7-bond模式介绍
bond模式: Mode=0(balance-rr)表示负载分担round-robin Mode=1(active-backup)表示主备模式,只有一块网卡是active,另外一块是备的standby ...
- 软件工程1916|W(福州大学)_助教博客】助教总结
2018年上个学期,我担任计算机专业软件工程实践课程的助教,因为有汪老师和她的两位优秀研究生担任助教,基本上没有让我做什么事,除了参加了几次课程答辩.我对于助教需要做的事情其实还是没什么概念的.这个学 ...
- 用数据泵技术实现逻辑备份Oracle 11g R2 数据泵技术详解(expdp impdp)
用数据泵技术实现逻辑备份 from:https://blog.csdn.net/weixin_41078837/article/details/80618916 逻辑备份概述 逻辑备份时创建数据库对象 ...
- ES6 的class类 笔记
class Person{ // 构造 constructor(x,y){ this.x = x; this.y = y; } toString(){ return (this.x + "的 ...
- 轻松学习之三——IMP指针的作用
http://www.jianshu.com/p/425a39d43d16 可能大家一直看到有许多朋友在Runtime相关文章中介绍IMP指针的概念,那么IMP究竟有什么实际作用呢?让我们先从一个函数 ...
- 【BZOJ1095】【ZJOI2007】捉迷藏
前言 好恶心的一道题,代码写了2.5h,调试调了5h+,局部重构了n遍. 题意 一棵树上的节点有黑白两色,初始为黑,支持修改颜色,查询最远黑点对.$n<=10^5,m<=5*10^5$ 题 ...
- Entity Framework Core Query Types
This feature was added in EF Core 2.1 Query types are non-entity types (classes) that form part of t ...
- utility.py:61: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array in
utility.py:: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; ...