ELK系列--justniffer0.5.12安装报错解决方法
2015-07-29 16:39
330 查看
现象:
justniffer的0.5.12(安装后显示0.5.13版本)安装过程中需要升级boost至1.46以上版本,同时在make时会出现如下报错:/opt/Python-2.6.6/Python/dynload_shlib.c:94: undefined reference to `dlsym'
/opt/Python-2.6.6/Python/dynload_shlib.c:130: undefined reference to `dlopen'
/opt/Python-2.6.6/Python/dynload_shlib.c:141: undefined reference to `dlsym'
/opt/Python-2.6.6/Python/dynload_shlib.c:133: undefined reference to `dlerror'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_acquire_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:349: undefined reference to `sem_wait'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_release_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_start_new_thread':
/opt/Python-2.6.6/Python/thread_pthread.h:181: undefined reference to `pthread_create'
/opt/Python-2.6.6/Python/thread_pthread.h:197: undefined reference to `pthread_detach'
/opt/Python-2.6.6/Python/thread_pthread.h:171: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_allocate_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:296: undefined reference to `sem_init'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_free_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:320: undefined reference to `sem_destroy'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_acquire_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:351: undefined reference to `sem_trywait'
/opt/Python-2.6.6/Python/thread_pthread.h:349: undefined reference to `sem_wait'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_release_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function `_pythread_pthread_set_stacksize':
/opt/Python-2.6.6/Python/thread_pthread.h:519: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_allocate_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:296: undefined reference to `sem_init'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_acquire_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:349: undefined reference to `sem_wait'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_release_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_acquire_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:349: undefined reference to `sem_wait'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_release_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function `PyThread_allocate_lock':
/opt/Python-2.6.6/Python/thread_pthread.h:296: undefined reference to `sem_init'
/usr/local/lib/libpython2.6.a(posixmodule.o): In function `posix_openpty':
posixmodule.c:(.text+0x1074): undefined reference to `openpty'
/usr/local/lib/libpython2.6.a(posixmodule.o): In function `posix_forkpty':
posixmodule.c:(.text+0x261c): undefined reference to `forkpty'
collect2: error: ld returned 1 exit status
make[1]: *** [justniffer] Error 1
make[1]: Leaving directory `/opt/justniffer-penuel-leo/justniffer-penuel-leo/src'
make: *** [all-recursive] Error 1
谷歌N久:collect2: error: ld returned 1 exit status,也没有发现太多类似问题。
最后谷歌:posixmodule.c:(.text+0x261c): undefined reference to `forkpty'和/opt/Python-2.6.6/Python/thread_pthread.h:296: undefined reference to `sem_init'发现原因和解决方案:
解决方案:
vi Makefile 和vi src/MakefileLIBS = -pthread -lm -lz -ldl -lutil-ldl -lutil是解决c的问题
-pthread是解决python的问题
如果还不行,可以再增加: -lm -lz
反思:应针对报错原因排查,而不能只根据报错结果。
感谢:http://www.coreseek.cn/forum/2_1330_0.html相关文章推荐
- js this指向问题
- Html5教程和素材
- Buffer中的flip()
- Delete Node in a Linked List
- javascript 继承
- 基于json-lib.jar包 创建JSONArray的四个常用方法
- JavaScript常用事件
- Dwr 前端报Error提示解决办法
- Leetcode #241 Different Ways to Add Parentheses
- js跨域访问,No ‘Access-Control-Allow-Origin‘ header is present on
- JSON
- html中设置锚点定位的几种常见方法
- Javascript 盒子模型
- WPF 4 DataGrid 控件(自定义样式篇)
- JSON在线API
- Bootstrap学习--认识Bootstarp
- 关于Node.js的本地应用打包工具node-webkit
- jQuery选择器
- js之 prototype 理解补充
- 区别script中的type=”text/javascript”和language=”Javascript”