2012-08-16 37 views
0

已經在我的linux系統中安裝wireshark,並且能夠創建makefile;但是當我嘗試做出來的時候。它給錯誤喜歡 -ld:找不到-lwiretap。爲什麼以及如何使它可用

$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 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中。 任何人都可以指導我解決這個錯誤!由於

+0

我猜你需要安裝devel包(S)太;他們有必要的頭文件等。哪些包取決於你的發行版。 – pavel 2012-08-16 16:22:15

+0

我已經有了libpcap-dev。 – 2012-08-16 16:56:15

+0

如果頭部缺失,編譯器會抱怨,而不是鏈接器。 – 2012-08-16 18:21:24

回答

1

安裝wireshark-devel。它包含竊聽庫的標題。

相關問題