checking for event2/thread.h... no libevent_pthreads required, failing

/**********************************************************************************
 *    checking for event2/thread.h... no libevent_pthreads required, failing
 * 说明:
 *     编译libwebsock,遇到这个问题,差点资料,解决一下,毕竟用起来简单。
 *
 *                                           2017-3-17 深圳 南山平山村 曾剑锋
 *********************************************************************************/

一、参考文档:
    1. magent编译报错error: event.h: No such file or directory
        http://blog.csdn.net/vio4677/article/details/48492927

二、编译错误输出:
    [email protected]:~/zengjf/zengjfos/libwebsock$ ./configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    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 whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking netdb.h usability... yes
    checking netdb.h presence... yes
    checking for netdb.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking for unistd.h... (cached) yes
    checking for size_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible realloc... yes
    checking for memset... yes
    checking for socket... yes
    checking for strstr... yes
    checking event2/thread.h usability... no
    checking event2/thread.h presence... no
    checking for event2/thread.h... no
    libevent_pthreads required, failing
    [email protected]:~/zengjf/zengjfos/libwebsock$ 

三、错误原因:
    1. 通过在根目录查找thread.h,未找到,说明是因为安装了libevent但是没有安装头文件导致的
    2. 重新下载libevent,然后编译安装就OK了
    3. http://libevent.org/下载libevent-2.0.22-stable.tar.gz
    4. ./configure && make && make install
时间: 2024-10-25 14:08:16

checking for event2/thread.h... no libevent_pthreads required, failing的相关文章

《SaltStack技术入门与实践》—— 实践案例 <中小型Web架构>3 Memcached配置管理

实践案例 <中小型Web架构>3 Memcached配置管理 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Memcached介绍 Memcached是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态数据库驱动网站的访问速度.Memcached基于一个存储键/值对的hashmap.其守护进程(daemon )是用C写的,但是客户端可以用任何语言来编写,并通

【原创】libevent2中锁相关代码

在 bufferevent-internal.h 中 [bufferevent的锁操作函数] /** Internal: Given a bufferevent, return its corresponding bufferevent_private. */ // 内部使用宏 // 通过 bufferevent 结构获取其所属的 bufferevent_private 结构 #define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_

Windows上安装Redmine-2.6.0的日志(话说这个软件还是不如JIRA好用,话说是不是再尝试一下trac?)

C:\redmine-2.6.0>gem install bundler Fetching: bundler-1.6.2.gem (100%) Successfully installed bundler-1.6.2 1 gem installed Installing ri documentation for bundler-1.6.2... Installing RDoc documentation for bundler-1.6.2... C:\redmine-2.6.0>bundle

一起读读libevent的源代码:Libevent 第一章 设置libevent

某人曾提醒我要多读源代码,我就选了libevent 2.1.8稳定版的源代码来读. 读了一会,纯看源代码里面的东西,还挺无聊的.所以我就开始,便看他们的编程教程: http://www.wangafu.net/~nickm/libevent-book/ 然后每遇到实现,我就跑去源代码中看别人怎么做到的. 这样还是比较有趣的,一个一个小目标的去做,直到这个事情是为什么而做. 我之前,已经把编程的指导粗略看过一边,也是边犯困边看,再开始看源代码,昨天睡了十次八次,才看了很小的一部分. 这样太慢了,而

从头开始安装redmine项目管理软件

redmine是采用ruby语言基于rails架构写的一款稳定高性能项目管理服务器,这里记录一下完整的安装过程. 注意:所有的操作都在普通用户中进行,不要使用root用户,如果需要高级别权限可以sudo命令执行. 第一步:安装RVM软件,参考链接:http://www.rvm.io/ RVM称作Ruby Version Management,用于管理RUBY的版本功能,可以实现自动安装.可以输入rvm回车查看支持的命令,rvm list known 可以查看当前支持的版本.[[email pro

Libevent教程001: 简介与配置

本文内容大致翻译自 libevent-book, 但不是照本翻译. 成文时, libevent最新的稳定版为 2.1.8 stable. 即本文如无特殊说明, 所有描述均以 2.1.8 stable 版本为准. 本文为系列文章的第一篇, 对应libevent-book的 chapter 0 + chapter 1 + R0 + R1 0. 前提条件 这个文档是对libevent的介绍与指导, 阅读文档需要你具有以下的能力: 你精通C语言 你至少了解Unix网络编程. 你会安装libevent 你

Windows下安装Redmine-2.5.3

安装准备 服务器操作系统:Windows Server 2008 R2 Standard,64位操作系统. RailsInstaller版本:2.2.4  (下载地址http://railsinstaller.org/en) ruby-2.0.0-p598-i386-mingw32.7z 文件(下载地址 http://rubyinstaller.org/downloads/) Redmine版本:2.5.3 (下载地址http://www.redmine.org/projects/redmine

R1:创建Libevent库

原文链接:http://www.wangafu.net/~nickm/libevent-book/Ref1_libsetup.html Setting up the Libevent library Libevent有一些被整个进程共享的全局设置.这些设置会影响到整个库.在使用Libevent库的其余部分之前,你应该先对这些设置做些修改.否则的话Libevent可能会以一种前后矛盾的状态终止( If you don’t, Libevent could wind up in an inconsis

redmine问题集锦02

1.ERROR:  While executing gem ... (Gem::Exception)    Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources 方法: 进入ruby源码解压包,进入ruby 源码包下的  ext/openssl ,用ruby自带的openssl编译,而不是yum 的openssl cd /root/ruby-2.1.5/ex