Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Fedora 18 安裝 arping 步驟:解決 libnet-devel、libpcap-devel 依賴

編輯:關於 Linux

arping 是 ARP 層級的 Ping 工具,用於區域網路裝置發現與 MAC 位址解析。Fedora 18 編譯安裝 arping-2.13 時需先安裝 libnet-devel (1.1.x) 與 libpcap-devel 開發套件,否則 ./configure 會報錯。

安裝步驟

  1. 下載源碼:
wget https://example.com/arping-2.13.tar.gz  # 官方來源
tar -zxvf arping-2.13.tar.gz
cd arping-2.13
  1. 嘗試編譯(會報錯):
./configure && make && make install
# configure: error: libnet 1.1.x not found
  1. 安裝 libnet-devel:
yum install libnet-devel
# 安裝版本:libnet-devel-1.1.4
  1. 再次編譯(可能報第二個錯):
./configure && make && make install
# configure: error: libpcap not found
  1. 安裝 libpcap-devel:
yum install libpcap-devel
  1. 最終編譯安裝成功:
./configure && make && make install
# arping 安裝至 /usr/local/sbin/arping

驗證安裝

arping -c 3 192.168.1.1
# ARPING 192.168.1.1 from 192.168.1.100 eth0
# Unicast reply from 192.168.1.1 [00:11:22:33:44:55]  0.845ms
# ...

arping 編譯安裝成功截圖

補充說明

  • Fedora 官方倉庫可能已有 arping 套件,優先嘗試 yum install arping(若可用)。
  • libnet 1.0.x 與 1.1.x API 不相容,arping 需 1.1.x。
  • 編譯安裝後可執行 make uninstall 移除,或手動刪除 /usr/local/sbin/arping。
Copyright © Windows教程網 All Rights Reserved