【问题标题】:centos ./configure error: libevent not found despite it is installed via yumcentos ./configure error: libevent not found 尽管它是通过 yum 安装的
【发布时间】:2018-05-02 13:39:08
【问题描述】:

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

系统是centos 6.9 并且“开发工具”和 libevent-devel 和 openssl-devel 是通过 yum 安装的。顺便说一句,./configure 会产生这个输出:

使用这个 repo (Telegram-CLI):

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

./配置:

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 或链接器找不到它们。任何人都可以帮忙吗? 谢谢

【问题讨论】:

  • 建议:# yum reinstall libevent libevent-devel ....这里没有问题,CentOS 6.9,“tg Telegram messenger CLI”:# yum install jansson-devel lua-devel readline-devel libconfig-devel libevent-devel。 ..... ..... tg/ : $ ./configure && make : 没有错误。
  • 谢谢,但没有解决问题

标签: gcc openssl telegram autoconf libevent


【解决方案1】:

你需要libevent-devel

yum install libevent-devel

【讨论】:

    猜你喜欢
    • 2016-04-03
    • 2016-10-20
    • 1970-01-01
    • 2017-10-16
    • 1970-01-01
    • 1970-01-01
    • 2020-10-20
    • 2014-09-14
    • 1970-01-01
    相关资源
    最近更新 更多