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 ...
随机推荐
- memcached的安装和学习
linux下安装memcached 第一首先要安装 libvevent ,用 rpm -qa | preg libevent ,用 which libevent 查看安装路径 以下图解: ...
- 洛谷P4180 【模板】严格次小生成树[BJWC2010] 题解
虽然中途写的时候有点波折,但是最后一发A,还是有点爽. 这虽然是个模板题,但还是涉及到许多知识的= = 首先我们求出一个最小生成树,并且求出其边权和\(ans\).那么现在考虑加入其它的边,每次加入在 ...
- C#通过SendARP()获取WinCE设备的Mac网卡物理地址
ARP(Address Resolution Protocol) 即 地址解析协议,是根据IP地址获取物理地址的一个TCP/IP协议. SendARP(Int32 dest, Int32 host, ...
- jmeter多个接口测试
针对接口文档,进行对应接口设计,多个接口设计用例需要使用事物控制器. 1.通过登录接口提取sign值 发送一个登录请求,然后通过正则表达式提取该sign值 正则表达式的使用,我稍后会在下一个博文中详细 ...
- firefox修改user-agent
让firefox对web服务器伪装成任意浏览器,找一个iphone的useragent,瞬间firefox变身iPhone有木有,一般人我不告诉他嘿嘿 1.firefox地址栏中输入about:con ...
- eclipse解决中文字体太小问题(转载)
最近新装了Win7,打开eclipse3.7中文字体很小,简直难以辨认.在网上搜索发现这是由于Eclipse 3.7 用的字体是 Consolas,显示中文的时候默认太小了. 解决方式有两种:一. ...
- 项目中有私有仓库模块时,使用 npm ci 命令的安装步骤
项目中有私有仓库模块时,使用 npm ci 命令的安装步骤: 先安装私有仓库模块:npm install <npm包名> --registry=<npm包源> 再运行命令:np ...
- windows下的批处理bat文件和Linux下的shell文件的互相转换
shell(Linux.Solaris) bat(windows) 含义 # rem 注释行 /[directory]/[directory]/.../[directory]/ [disk]:\[di ...
- Spring Boot 2.x(十六):玩转vue文件上传
为什么使用Vue-Simple-Uploader 最近用到了Vue + Spring Boot来完成文件上传的操作,踩了一些坑,对比了一些Vue的组件,发现了一个很好用的组件--Vue-Simple- ...
- jQuery中判断数组
判断数组里面是否包含某个元素可以使用 $.inArray("元素(字符串)",数组名称) 进行判断 ,当存在该元素(字符串)时,返回该元素在数组的下标,不存在时返回 -1 jQ=& ...