LD:找不到 -lwiretap。为什么以及如何使其可用

ld: can not find -lwiretap. Why & how can I make it available

本文关键字:何使其 为什么 找不到 -lwiretap LD      更新时间:2023-10-16
已经

在我的Linux盒子里安装了Wireshark,也可以创建makefile;但是当我尝试制作它时。它给出的错误如下-

$make
rm -f blib/arch/auto/Wtap/Wtap.so
cc  -shared -O2 -g -L/usr/local/lib -fstack-protector Wtap.o  -o blib/arch/auto/Wtap/Wtap.so    
       -L/usr/lib/wireshark -lwiretap   
/usr/bin/ld: cannot open output file blib/arch/auto/Wtap/Wtap.so: Permission denied
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Wtap/Wtap.so] Error 1

此外,sudo 无法解决错误

$sudo make
chmod 644 Wtap.bs
rm -f blib/arch/auto/Wtap/Wtap.so
cc  -shared -O2 -g -L/usr/local/lib -fstack-protector Wtap.o  -o blib/arch/auto/Wtap/Wtap.so    
       -L/usr/lib/wireshark -lwiretap   
/usr/bin/ld: cannot find -lwiretap
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Wtap/Wtap.so] Error 1

我在linuxbox中搜索以找到 libwiretap.so。它驻留在/usr/lib 中。任何人都可以指导我以解决此错误!谢谢

安装 wireshark-devel .它包含窃听库的标头。