Prerequisite Library
Refer to dpdk.org for extended requirements details and optional tools. The following prerequisites include the base requirements for most setup scenarios.
Development Tools:
General development tools such as a supported C compiler are required.
To install:
- For Ubuntu: apt install build-essential
- For RHEL: dnf groupinstall “Development Tools”
NUMA:
NUMA is required by most modern machines, but not needed for non-NUMA architectures.
For compiling the NUMA lib, run libtool -version to ensure that the libtool version is greater than or equal to 2.2. Otherwise, the compilation will fail with errors. For Ubuntu:
sudo apt-get install libnuma-dev For RHEL:
yum install numactl-devel or:
git clone https://github.com/numactl/numactl.git
cd numactl
./autogen.sh
./configure
make install The NUMA header files and lib file are generated in the include and lib folders, respectively, under <numa install dir>.
Python:
For Ubuntu:
apt-get install python3 Create a symlink to it: sudo ln -s /usr/bin/python3 /usr/bin/python
A dependency has been added for building DPDK on Linux or FreeBSD: The Python module pyelftools (version 0.22 or greater), often packaged as python3-pyelftools, is required. If not available as a distribution package, it can be installed with:
pip3 install pyelftools or, if using Ubuntu, with:
apt install python3-elftools or, download pyelftools from https://pypi.org/project/pyelftools/#files
tar -xzvf pyelftools-0.27.tar.gz
cd pyelftools-0.27
python setup.py install
pip3 install pyelftools Meson and Ninja:
The Meson and Ninja tools are required to configure the DPDK build.
For Ubuntu:
sudo apt install meson ninja-build For RHEL:
sudo dnf install meson ninja-build If MESON is not available as a suitable package, it can also be installed using the Python 3 pip tool:
sudo apt install python3-pip
pip3 install meson pip3 puts the executable under /usr/local/lib/python3.8/dist-packages, so put that directory in your PATH. For example:
PATH="/usr/local/lib/python3.8/dist-packages:$PATH" If the following error is seen: “Requires >=0.47.1 but the version of Meson is 0.45.1” First, remove meson installed by apt if installed:
sudo apt purge meson -y Then, install via pip3:
sudo pip3 install meson Then, make a symlink in bin folder from local bin:
sudo ln -s /usr/local/bin/meson /usr/bin/meson Now, check:
which meson && meson --version