我正在尝试安装 pcapsipdump,但是当我尝试制作时出现以下错误。安装了 libpcab 和 libpcap-devel,这是我通过“yum install libpcap libpcap-devel”完成的。我目前坚持如何进一步调试,所以我正在伸出援手。谢谢
[root@master-server pcapsipdump-code]# make
make-checks/libpcap.cpp: In function ‘int main()’:
make-checks/libpcap.cpp:2: error: ‘pcap_set_snaplen’ was not declared in this scope
g++ make-checks/libpcap.cpp -lpcap -o make-checks/libpcap
===
Required library not found: pcap
Please install it in your distribution-specific manner, e.g.:
yum install libpcap libpcap-devel
apt-get install tcpdump libpcap-dev
cd ~ports/net/libpcap && make install
===
make: *** [make-checks/libpcap] Error 1
yum install libpcap libpcap-devel 的输出
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirrors.vooservers.com
* base: mirrors.vooservers.com
* extras: mirrors.vooservers.com
* updates: centos.hyve.com
Setting up Install Process
Package 14:libpcap-0.9.4-15.el5.i386 already installed and latest version
Package 14:libpcap-devel-0.9.4-15.el5.i386 already installed and latest version
Nothing to do
make debug 很长,但如果这有帮助,那么 end 在下面:
Considering target file `make-checks/all'.
File `make-checks/all' does not exist.
Considering target file `make-checks/cxx'.
Finished prerequisites of target file `make-checks/cxx'.
No need to remake target `make-checks/cxx'.
Considering target file `make-checks/libpcap'.
File `make-checks/libpcap' does not exist.
Finished prerequisites of target file `make-checks/libpcap'.
Must remake target `make-checks/libpcap'.
Putting child 0x09cec050 (make-checks/libpcap) PID 8162 on the chain.
Live child 0x09cec050 (make-checks/libpcap) PID 8162
make-checks/libpcap.cpp: In function ‘int main()’:
make-checks/libpcap.cpp:2: error: ‘pcap_set_snaplen’ was not declared in this scope
您需要 1) 获得SVN r43之前的版本或 2) 安装 libpcap 1.0 或更高版本。
pcapsipdump 开发人员认为该
-B
标志非常重要,以至于他们没有使用配置脚本检查 libpcap 1.0pcap_create()
/pcap_activate()
API 是否可用,如果新 API 不可用则继续使用旧pcap_open_live()
API,而是切换到新 API因此需要 libpcap 1.0 或更高版本。然后他们没有让错误消息说出诸如
要明确问题不一定是未安装 pcap,可能是安装的版本太旧。
如果您从其 SourceForge 项目页面下载 pcapsipdump 0.2 ,您将获得 SVN r43 之前的版本,因此如果您尝试构建它,您将不会看到该特定问题。
要在不升级到更新版本的操作系统的情况下安装更新版本的 libpcap,您可能必须从tcpdump.org 网站下载 libpcap 源代码并构建它,除非您可以从其他 RPM 站点获取它.
Lokks 就像你是从 svn 来源制作的,对吧?从 sourceforge 下载 tar.gz 为我解决了这个问题。