How to install OFED 4.6.1 on CentOS 7.8?

Dear Mellanox community.

I’m attempting to set up the Cisco TRex traffic generator ( with ConnectX-4 and ConnectX-5 adapters.

TRex has a specific dependency on Mellanox OFED version 4.6.1 (

I have a CentOS 7.8 box (x86_64). TRex recommends using CentOS 7.6, but I’m unable to downgrade to it from 7.8.

Unfortunately, there isn’t a currently packaged version of OFED 4.6.1 (x86_64) for CentOS 7.8 at

Is it even wise to try to install OFED 4.6.1 on CentOS 7.8? I have attempted something like

sudo ./mlnxofedinstall --with-mft --with-mstflint --dpdk --upstream-libs --distro rhel7.6 --add-kernel-support

but it failed. The error in the log file is the following:

Running rpmbuild --rebuild --define ‘_topdir /tmp/MLNX_OFED_LINUX-4.6-’ --define ‘_sourcedir %{_topdir}/SOURCES’ --define ‘_specdir %{_topdir}/SPECS’ --define ‘_srcrpmdir %{_topdir}/SRPMS’ --define ‘_rpmdir %{_topdir}/RPMS’ --nodeps --define ‘_dist .rhel7u6’ --define ‘configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlxfw-mod --with-mlx4-mod --with-mlx4_en-mod --with-mlx5-mod --with-ipoib-mod --with-innova-flex --with-srp-mod --with-iser-mod --with-e_ipoib-mod --with-isert-mod’ --define ‘KVERSION 3.10.0-1127.19.1.el7.x86_64’ --define ‘K_SRC /lib/modules/3.10.0-1127.19.1.el7.x86_64/build’ --define ‘_prefix /usr’ /tmp/MLNX_OFED_LINUX-4.6-

Failed to build mlnx-ofa_kernel 4.6 RPM

I can attach the more detailed debug log file if it might help.

Please let me know how to proceed as the specific dependency of versions across OFED and CentOS and the traffic generator is blocking me from getting off the ground.

Thank you in advance for any guidance!


Hi Srinivas Narayana,

MLNX_OFED 4.6 does not support Centos 7.8.

You can use MLNX_OFED 5.0-, which supports Centos 7.8

It’s available to download from our website:

I have a system with MLNX_OFED 5.0- & Trex, and it’s working well.

Best Regards,


Dear Chen,

I was indeed able to run TRex v2.86 on CentOS 7.8 by installing the OFED version 5.0-

sudo ./mlnxofedinstall --with-mft --with-mstflint --dpdk --upstream-libs --add-kernel-support

Thanks so much for helping out with the number of a compatible OFED version! I’m much grateful.