zoukankan      html  css  js  c++  java
  • ELK系列--justniffer0.5.12安装报错解决方法

    现象:

    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

  • 相关阅读:
    算法----(1)冒泡排序
    淘宝爬虫
    爬虫_豆瓣电影top250 (正则表达式)
    爬虫_猫眼电影top100(正则表达式)
    Android 简单调用摄像头
    Android 简单天气预报
    思维模型
    This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you
    Android studio preview界面无法预览,报错render problem
    Android studio 3.1.2报错,no target device found
  • 原文地址:https://www.cnblogs.com/phoenix--/p/4686333.html
Copyright © 2011-2022 走看看