Closed bettswang closed 2 years ago
If you built kernel modules
is a key here. In order to build them you need to use:
./configure --with-linux=/lib/modules/$(uname -r)/build
You will also need the package with your kernel headers installed. More info on different configuration options in the docs: https://docs.openvswitch.org/en/latest/intro/install/general/#configuring
package have already installed. Try to use ./configure -with-linux , didn't work. Do I make any mistake?
[root@CentOS8 ovs]# uname -r 4.18.0-305.3.1.el8.x86_64 [root@CentOS8 ovs]# rpm -qa | grep kernel kernel-4.18.0-305.3.1.el8.x86_64 kernel-core-4.18.0-305.3.1.el8.x86_64 kernel-headers-4.18.0-348.7.1.el8_5.x86_64 kernel-tools-4.18.0-305.3.1.el8.x86_64 kernel-devel-4.18.0-348.7.1.el8_5.x86_64 kernel-modules-4.18.0-305.3.1.el8.x86_64 kernel-tools-libs-4.18.0-305.3.1.el8.x86_64
[root@CentOS8 ovs]#./configure --with-linux=/lib/modules/$(uname -r)/build …… checking whether DPCLS Autovalidator is default implementation... no checking whether DPIF AVX512 is default implementation... no checking whether MFEX Autovalidator is default implementation... no checking binutils avx512 assembler checks passing... yes checking whether gcc accepts -mavx512f... yes configure: WARNING: --with-linux is deprecated and kernel support is limited to 5.8 and below checking for Linux build directory... /lib/modules/4.18.0-305.3.1.el8.x86_64/build checking for Linux source directory... sed: can't read /lib/modules/4.18.0-305.3.1.el8.x86_64/build/Makefile: No such file or directory configure: error: cannot find source directory (please use --with-linux-source)
Your version of kernel-devel
package doesn't match the running krenel. 348 vs 305. You need to install the kernel-devel
package for your current kernel.
You are right. I have update the kernel and it match the kernel-devel. Everything is ok now. Thank you so much.
OS version: [root@CentOS8 ovs]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 8.4.2105 Release: 8.4.2105 Codename: n/a
Install depencecy
yum install make gcc openssl libcap-ng python3 automake autoconf libtool
install ovs(version2.16.2)
git clone https://github.com/openvswitch/ovs.git
cd ovs
./boot
./configure
make modules_install
make: Nothing to be done for 'modules_install'.
I check the ovs doc , it worte as below: ....... If you built kernel modules, you may install them, e.g.: $ make modules_install .........
I also google this issue, but get nothing.
I am a newbie. Please tell me how to solve it. Many thanks.