开源代码的编译configure的相关选项

3 篇文章 0 订阅
3 篇文章 0 订阅

目标:移植tcpdump的文件,apt-get source tcpdump  得到源代码,配置  ./configure  --prefix=/home/apple/you/net/day01/test/bin_tcpdump/


缺少库文件:libpcap,apt-get source libpcap    得到库的源码,

2131  ./configure --prefix=/home/apple/you/net/day01/test/bin_libpcap/
 2132  make
 2133  make install 


./configure  --prefix=/home/apple/you/net/day01/test/bin_tcpdump/  --includedir=/home/apple/you/net/day01/test/bin_libpcap/include/  --libdir=/home/apple/you/net/day01/test/bin_libpcap/lib/

make

出现error

/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x2c8): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x38e): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x404): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x4be): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x51f): undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x5d4): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x642): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x670): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [tcpdump] Error 1


root@ubuntu:/home/apple/you/net/day01/test/tcpdump-4.0.0# ./configure  --prefix=/home/apple/you/net/day01/test/bin_tcpdump/  --includedir=/home/apple/you/net/day01/test/bin_libpcap/include/  --libdir=/home/apple/you/net/day01/test/bin_libpcap/lib/  LDFLAGS=-ldl



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值