centos ./configure错误:尽管它是通过yum安装的,但找不到libevent

问题描述 投票:1回答:1

我有一个非常奇怪的问题。我正在尝试编译依赖于openssl,libevent和其他库的源(telegram-cli)。

系统为centos 6.9和“开发工具”以及libevent-devel和openssl-devel是通过yum安装的。顺便说一句,。/ configure会导致以下输出:

使用此仓库(Telegram-CLI):

git clone --recursive https://github.com/vysheng/tg.git && cd tg

./ configure:

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing clock_gettime... no
checking for library containing backtrace... no
checking for event_base_new in -levent... no
configure: error: no libevent found

gcc -v -N:

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

我也将此添加到/etc/ld.so.conf.d/:

/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/lib
/lib64
/usr/lib64/openssl/engines
/usr/lib64/libevent-1.4.so.2.1.3
/usr/lib64/libgcrypt.so
/usr/lib64/libevent.so

奇怪的是,所有这些配置在另一个centos系统上都是相同的,并且一切正常。 :(

我想这些库存在于系统上,但gcc或链接器找不到它们。有人可以帮忙吗?谢谢

gcc openssl telegram autoconf libevent
1个回答
0
投票

您需要libevent-devel

yum install libevent-devel

© www.soinside.com 2019 - 2024. All rights reserved.