2016-09-07 78 views
0

我想在我的機器上編譯wireshark,因爲我需要添加一些自定義插件。當我運行make install,我得到的消息:ld在錯誤的路徑中搜索,並搜索錯誤的庫

/usr/bin/ld: cannot find -lwsutil 

運行命令ld -lwsutil --verbose給出(最後幾行)

attempt to open //usr/local/lib/x86_64-linux-gnu/libwsutil.so failed 
attempt to open //usr/local/lib/x86_64-linux-gnu/libwsutil.a failed 
attempt to open //lib/x86_64-linux-gnu/libwsutil.so failed 
attempt to open //lib/x86_64-linux-gnu/libwsutil.a failed 
attempt to open //usr/lib/x86_64-linux-gnu/libwsutil.so failed 
attempt to open //usr/lib/x86_64-linux-gnu/libwsutil.a failed 
attempt to open //usr/local/lib64/libwsutil.so failed 
attempt to open //usr/local/lib64/libwsutil.a failed 
attempt to open //lib64/libwsutil.so failed 
attempt to open //lib64/libwsutil.a failed 
attempt to open //usr/lib64/libwsutil.so failed 
attempt to open //usr/lib64/libwsutil.a failed 
attempt to open //usr/local/lib/libwsutil.so failed 
attempt to open //usr/local/lib/libwsutil.a failed 
attempt to open //lib/libwsutil.so failed 
attempt to open //lib/libwsutil.a failed 
attempt to open //usr/lib/libwsutil.so failed 
attempt to open //usr/lib/libwsutil.a failed 
attempt to open //usr/x86_64-linux-gnu/lib64/libwsutil.so failed 
attempt to open //usr/x86_64-linux-gnu/lib64/libwsutil.a failed 
attempt to open //usr/x86_64-linux-gnu/lib/libwsutil.so failed 
attempt to open //usr/x86_64-linux-gnu/lib/libwsutil.a failed 

有兩件事情我可以從這裏看到:上有一個額外的斜槓它試圖打開目錄(?這是罰款) 目錄是錯誤的:我可以在/usr/local/lib 此外,它試圖查找文件看wsutil是錯誤的 - 爲wsutil的文件是:

libwsutil 
libwsutil.3 
libwsutil.3.0.0 
libwsutil.la 

我應該從哪裏開始解決這些問題?

UPDATE:運行ls -lh /usr/local/lib/libwsutil*

lrwxrwxrwx 1 root root 15 Sep 8 11:22 /usr/local/lib/libwsutil -> libwsutil.3.0.0 
lrwxrwxrwx 1 root root 15 Sep 8 11:22 /usr/local/lib/libwsutil.3 -> libwsutil.3.0.0 
-rwxr-xr-x 1 root root 65K Sep 8 11:22 /usr/local/lib/libwsutil.3.0.0 
-rwxr-xr-x 1 root root 866 Sep 8 11:22 /usr/local/lib/libwsutil.la 

而且這我安裝Wireshark的版本是1.10.8,在Ubuntu 16.04。

另一件需要補充的是:我沒有下的lib64目錄(只有lib存在)。當我執行arch時,它給出了x86_64

+0

你可以更新你的問題來包含'ls -lh/usr/local/lib/libwsutil *'的輸出嗎? – redneb

+0

@redneb更新 – nnja

+0

這裏應該有一個'* .so'文件,這就是'ld'正在尋找的東西。你是如何安裝wireshark(我相信提供該庫)?也許你可以試着用軟件包管理器重新安裝它。 – redneb

回答

1

如果你沒有特別的理由來構建自己,從包中安裝libswutil。

apt-get install libwsutil-dev 

Wireshark是也是在封裝,你不需要任何開發包:

apt-get install wireshark 

大部分的自定義插件進行了書面lua,所以你不必編譯Wireshark的在所有。