解压dpdk-19.11.tar
cd dpdk-19.11
#RTE_SDK是代码顶层目录
#RTE_TARGET是选择编译平台,这里是64位linux系统,使用gcc编译
export RTE_SDK=/home/nxy/software/dpdk-19.11
export RTE_TARGET=x86_64-native-linuxapp-gcc
sed -ri 's,(PMD_PCAP=).*,\1y,' config/common_base
make config T=$RTE_TARGET
#编译生成|DESTDIR是安装目录
make -j 10 install T=$RTE_TARGET DESTDIR=/home/nxy/software/dpdk
#或者
export DESTDIR=/usr/local
make -j 10 install T=$RTE_TARGET
-------------------------------------------------------------------------------------------------
遇到问题:
pcap.h:没有那个文件或目录
解决:
yum install -y libpcap-devel #root用户安装后再重新编译dpdk