1、下载iproute2
cd /usr/local/src/
git clone https://github.com/shemminger/iproute2.git
稳定版本库
git://git.kernel.org/pub/scm/network/iproute2/iproute2.git
2、下载编译安装libmnl
git clone git://git.netfilter.org/libmnl
cd libmnl/
sh autogen.sh
./configure
make
make install
3、编译安装iproute2
pkg-config默认搜索*.pc的路径
pkg-config --variable pc_path pkg-confi
# /usr/lib64/pkgconfig:/usr/share/pkgconfig
cd /usr/local/src/iproute2
find / -name *.pc | grep libmnl
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
vim config.mk
多了如下:
make
make install all