1. /**********************************************************************************
  2. * checking for event2/thread.h... no libevent_pthreads required, failing
  3. * 说明:
  4. * 编译libwebsock,遇到这个问题,差点资料,解决一下,毕竟用起来简单。
  5. *
  6. * 2017-3-17 深圳 南山平山村 曾剑锋
  7. *********************************************************************************/
  8.  
  9. 一、参考文档:
  10. . magent编译报错error: event.h: No such file or directory
  11. http://blog.csdn.net/vio4677/article/details/48492927
  12.  
  13. 二、编译错误输出:
  14. zengjf@zengjf:~/zengjf/zengjfos/libwebsock$ ./configure
  15. checking for a BSD-compatible install... /usr/bin/install -c
  16. checking whether build environment is sane... yes
  17. checking for a thread-safe mkdir -p... /bin/mkdir -p
  18. checking for gawk... no
  19. checking for mawk... mawk
  20. checking whether make sets $(MAKE)... yes
  21. checking whether make supports nested variables... yes
  22. checking for gcc... gcc
  23. checking whether the C compiler works... yes
  24. checking for C compiler default output file name... a.out
  25. checking for suffix of executables...
  26. checking whether we are cross compiling... no
  27. checking for suffix of object files... o
  28. checking whether we are using the GNU C compiler... yes
  29. checking whether gcc accepts -g... yes
  30. checking for gcc option to accept ISO C89... none needed
  31. checking whether gcc understands -c and -o together... yes
  32. checking for style of include used by make... GNU
  33. checking dependency style of gcc... gcc3
  34. checking build system type... x86_64-unknown-linux-gnu
  35. checking host system type... x86_64-unknown-linux-gnu
  36. checking how to print strings... printf
  37. checking for a sed that does not truncate output... /bin/sed
  38. checking for grep that handles long lines and -e... /bin/grep
  39. checking for egrep... /bin/grep -E
  40. checking for fgrep... /bin/grep -F
  41. checking for ld used by gcc... /usr/bin/ld
  42. checking if the linker (/usr/bin/ld) is GNU ld... yes
  43. checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  44. checking the name lister (/usr/bin/nm -B) interface... BSD nm
  45. checking whether ln -s works... yes
  46. checking the maximum length of command line arguments...
  47. checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
  48. checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
  49. checking for /usr/bin/ld option to reload object files... -r
  50. checking for objdump... objdump
  51. checking how to recognize dependent libraries... pass_all
  52. checking for dlltool... no
  53. checking how to associate runtime and link libraries... printf %s\n
  54. checking for ar... ar
  55. checking for archiver @FILE support... @
  56. checking for strip... strip
  57. checking for ranlib... ranlib
  58. checking command to parse /usr/bin/nm -B output from gcc object... ok
  59. checking for sysroot... no
  60. checking for a working dd... /bin/dd
  61. checking how to truncate binary pipes... /bin/dd bs= count=
  62. checking for mt... mt
  63. checking if mt is a manifest tool... no
  64. checking how to run the C preprocessor... gcc -E
  65. checking for ANSI C header files... yes
  66. checking for sys/types.h... yes
  67. checking for sys/stat.h... yes
  68. checking for stdlib.h... yes
  69. checking for string.h... yes
  70. checking for memory.h... yes
  71. checking for strings.h... yes
  72. checking for inttypes.h... yes
  73. checking for stdint.h... yes
  74. checking for unistd.h... yes
  75. checking for dlfcn.h... yes
  76. checking for objdir... .libs
  77. checking if gcc supports -fno-rtti -fno-exceptions... no
  78. checking for gcc option to produce PIC... -fPIC -DPIC
  79. checking if gcc PIC flag -fPIC -DPIC works... yes
  80. checking if gcc static flag -static works... yes
  81. checking if gcc supports -c -o file.o... yes
  82. checking if gcc supports -c -o file.o... (cached) yes
  83. checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  84. checking whether -lc should be explicitly linked in... no
  85. checking dynamic linker characteristics... GNU/Linux ld.so
  86. checking how to hardcode library paths into programs... immediate
  87. checking whether stripping libraries is possible... yes
  88. checking if libtool supports shared libraries... yes
  89. checking whether to build shared libraries... yes
  90. checking whether to build static libraries... no
  91. checking netdb.h usability... yes
  92. checking netdb.h presence... yes
  93. checking for netdb.h... yes
  94. checking for stdlib.h... (cached) yes
  95. checking for string.h... (cached) yes
  96. checking sys/socket.h usability... yes
  97. checking sys/socket.h presence... yes
  98. checking for sys/socket.h... yes
  99. checking for unistd.h... (cached) yes
  100. checking for size_t... yes
  101. checking for stdlib.h... (cached) yes
  102. checking for GNU libc compatible malloc... yes
  103. checking for stdlib.h... (cached) yes
  104. checking for GNU libc compatible realloc... yes
  105. checking for memset... yes
  106. checking for socket... yes
  107. checking for strstr... yes
  108. checking event2/thread.h usability... no
  109. checking event2/thread.h presence... no
  110. checking for event2/thread.h... no
  111. libevent_pthreads required, failing
  112. zengjf@zengjf:~/zengjf/zengjfos/libwebsock$
  113.  
  114. 三、错误原因:
  115. . 通过在根目录查找thread.h,未找到,说明是因为安装了libevent但是没有安装头文件导致的
  116. . 重新下载libevent,然后编译安装就OK
  117. . http://libevent.org/下载libevent-2.0.22-stable.tar.gz
  118. . ./configure && make && make install

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

  1. Libevent源码学习笔记一:event2/event.h

    一.libevent标准使用方法: 每个程序使用Libevent必须include <event2/event.h> 头文件,并 传给 -levent  链接器.如果只是想使用主要的eve ...

  2. thread.h

    https://github.com/wookayin/pintos/blob/master/src/threads/thread.h #ifndef THREADS_THREAD_H   #defi ...

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

    实践案例 <中小型Web架构>3 Memcached配置管理 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Memcached介绍 Me ...

  4. 使用 Passenger +Apache扩展 Puppet,代替其Webrick的web框架

    使用 Passenger +Apache扩展 Puppet,代替其Webrick的web框架 1安装 yum install ruby-devel ruby-libs rubygems libcurl ...

  5. Libevent教程001: 简介与配置

    本文内容大致翻译自 libevent-book, 但不是照本翻译. 成文时, libevent最新的稳定版为 2.1.8 stable. 即本文如无特殊说明, 所有描述均以 2.1.8 stable ...

  6. 融合libevent和protobuf

    写了一个简单的例子,把libevent中的bufferevent网络收发服务和protobuf里面的序列反序列结合起来. protobuf文件message.proto: message PMessa ...

  7. 源码安装gitlab

    GitLab服务构成 GitLab由以下服务构成:   nginx:静态Web服务器 gitlab-shell:用于处理Git命令和修改authorized keys列表 gitlab-workhor ...

  8. 使用bufferevent进行libevent服务端和客户端的开发

    参考了网上的一些例子,实验了基于bufferevent的开发. 首先是服务端: #include <netinet/in.h> #include <sys/socket.h> ...

  9. 零零碎碎搞了一天最后发现是ruby版本问题

    查来查去查不到问题,后来在stackoverflow看到: http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fail ...

随机推荐

  1. 剑指offer 面试48题

    面试48题:题目:最长不含重复字符的子字符串 题:请从字符串中找出一个最长的不包含重复字符的子字符串,计算该最长字符串的长度.假设字符串中只包含‘a’-‘z’的字符.例如,在字符串“arabcacfr ...

  2. 对称加密&非对称加密

    对称密钥密码算法的特点: 算法简单,加/解密速度快,但密钥管理复杂,不便于数字签名: 非对称密钥密码算法的特点: 算法复杂,加/解密速度慢,密钥管理简单,可用于数字签名. 所以将两者结合起来,形成混合 ...

  3. Simple Tips for Collection in Python

    I believe that the following Python code is really not hard to understand. But I think we should use ...

  4. kafka connect简介以及部署

    https://blog.csdn.net/u011687037/article/details/57411790 1.什么是kafka connect? 根据官方介绍,Kafka Connect是一 ...

  5. Python学习进程(3)Python基本数据类型

        本节介绍在Python语法中不同的变量数据类型.     (1)基本数据类型: >>> a=10; >>> b=10.0; >>> c=T ...

  6. C# RSACryptoServiceProvider加密解密签名验签和DESCryptoServic

    C#在using System.Security.Cryptography下有 DESCryptoServiceProvider RSACryptoServiceProvider DESCryptoS ...

  7. Linux脚本程序包及安装

    概述 脚本程序并不多见,所以在软件包分类中并没有把它列为一类.它更加类似于 Windows 下的程序安装,有一个可执行的安装程序,只要运行安装程序,然后进行简单的功能定制选择(比如指定安装目录等),就 ...

  8. 【TopCoder】SRM151 DIV2 练习总结

    第一次做完整的SRM题,刷完感觉萌萌哒,不过自己对java中很多细节不熟练,还要边做题边google. 250分的题:判断字符串序列是否是前缀码,如果不是,返回第一个违反前缀码规则的字符串. 简单的暴 ...

  9. Python编程-常用模块及方法

    常用模块介绍 一.time模块 在Python中,通常有这几种方式来表示时间: 时间戳(timestamp):通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量.我们运行 ...

  10. R的几个基础函数

    本章目录: 1.路径和文件 2.数据转换 3.获得帮助 路径和文件: 1.工作路径: 显示当前路径:getwd() 设置路径:setwd(“绝对路径”) 2.目录: 创建目录:dir.create(& ...