linux下能够指定位置安装libevent,但是MAKE时报错,求解?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下能够指定位置安装libevent,但是MAKE时报错,求解?相关的知识,希望对你有一定的参考价值。
make[2]: Entering directory `/home/libevent-2.0.20-stable'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -MT event.lo -MD -MP -MF .deps/event.Tpo -c -o event.lo event.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -MT event.lo -MD -MP -MF .deps/event.Tpo -c event.c -fPIC -DPIC -o .libs/event.o
event.c:54:20: error: string.h: No such file or directory
event.c: In function 'event_debug_map_HT_GROW':
event.c:193: warning: implicit declaration of function 'memset'
event.c:193: warning: incompatible implicit declaration of built-in function 'memset'
event.c:193: warning: incompatible implicit declaration of built-in function 'memset'
event.c: In function 'event_config_is_avoided_method':
event.c:464: warning: implicit declaration of function 'strcmp'
event.c: In function 'event_deferred_cb_queue_init':
event.c:495: warning: incompatible implicit declaration of built-in function 'memset'
event.c: In function 'event_base_init_common_timeout':
event.c:1188: warning: implicit declaration of function 'memcpy'
event.c:1188: warning: incompatible implicit declaration of built-in function 'memcpy'
event.c: In function 'event_deferred_cb_init':
event.c:2323: warning: incompatible implicit declaration of built-in function 'memset'
event.c: In function 'event_mm_calloc_':
event.c:2651: warning: incompatible implicit declaration of built-in function 'memset'
event.c: In function 'event_mm_strdup_':
event.c:2661: warning: implicit declaration of function 'strlen'
event.c:2661: warning: incompatible implicit declaration of built-in function 'strlen'
event.c:2664: warning: incompatible implicit declaration of built-in function 'memcpy'
event.c:2670: warning: implicit declaration of function 'strdup'
event.c:2670: warning: incompatible implicit declaration of built-in function 'strdup'
make[2]: *** [event.lo] Error 1
make[2]: Leaving directory `/home/libevent-2.0.20-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/libevent-2.0.20-stable'
make: *** [all] Error 2
开发环境没装全?还是你的系统已经挂了。追问
不是的,我把之前系统自带的LIBEVENT给删了,想重新再装一下,现在就是MAKE不过去
追答自带 libevent 和你重新装是两个概念。
如果你要是想重装,最好的选择应该是用系统的安装盘重装这个软件包,而不是用源代码装。
这是两个过程和两个结果,不是一个东西。
linux下libevent的安装
1、下载安装源码包libevent-2.0.21-stable.tar.gz
2、解压并安装
tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.1.4-alpha
./configure -prefix=/usr/libevent
make
--切换root用户再进行一下操作
su - root
sudo make install
以上是关于linux下能够指定位置安装libevent,但是MAKE时报错,求解?的主要内容,如果未能解决你的问题,请参考以下文章