内核版本22.03LTS-SP4,无法安装nvidia显卡

报错:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:123: /tmp/selfgz54499/NVIDIA-Linux-x86_64-515.65.01/kernel/Module.symvers] Error 1
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1777: modules] Error 2
make[1]: Leaving directory ‘/usr/src/kernels/5.10.0-216.0.0.115.oe2203sp4.x86_64’
make: *** [Makefile:82: modules] Error 2
→ Checking to see whether the nvidia kernel module was successfully built
executing: ‘cd ./kernel; /usr/bin/make -k -j32 NV_KERNEL_MODULES=“nvidia” NV_EXCLUDE_KERNEL_MODULES=“” SYSSRC=“/lib/modules/5.10.0-216.0.0.115.oe2203sp4.x86_64/source” SYSOUT=“/lib/modules/5.10.0-216.0.0.115.oe2203sp4.x86_64/build”’…
make[1]: Entering directory ‘/usr/src/kernels/5.10.0-216.0.0.115.oe2203sp4.x86_64’
scripts/Makefile.lib:8: ‘always’ is deprecated. Please use ‘always-y’ instead
MODPOST /tmp/selfgz54499/NVIDIA-Linux-x86_64-515.65.01/kernel/Module.symvers
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:123: /tmp/selfgz54499/NVIDIA-Linux-x86_64-515.65.01/kernel/Module.symvers] Error 1
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1777: modules] Error 2
make[1]: Leaving directory ‘/usr/src/kernels/5.10.0-216.0.0.115.oe2203sp4.x86_64’
make: *** [Makefile:82: modules] Error 2
→ Error.
ERROR: An error occurred while performing the step: “Checking to see whether the nvidia kernel module was successfully built”. See /var/log/nvidia-installer.log for details.
→ The command cd ./kernel; /usr/bin/make -k -j32 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.0-216.0.0.115.oe2203sp4.x86_64/source" SYSOUT="/lib/modules/5.10.0-216.0.0.115.oe2203sp4.x86_64/build" failed with the following output:

make[1]: Entering directory ‘/usr/src/kernels/5.10.0-216.0.0.115.oe2203sp4.x86_64’
scripts/Makefile.lib:8: ‘always’ is deprecated. Please use ‘always-y’ instead
MODPOST /tmp/selfgz54499/NVIDIA-Linux-x86_64-515.65.01/kernel/Module.symvers
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:123: /tmp/selfgz54499/NVIDIA-Linux-x86_64-515.65.01/kernel/Module.symvers] Error 1
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1777: modules] Error 2
make[1]: Leaving directory ‘/usr/src/kernels/5.10.0-216.0.0.115.oe2203sp4.x86_64’
make: *** [Makefile:82: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

从报错信息来看:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
就是nvidia.ko是一个GPL不兼容的模块,但又使用了GPL-only的函数。导致安装失败.

你可以尝试使用如下仓库的nvidia驱动包,这个包在openEuler-22.03-LTS版本上测试验证过的,应该没问题能直接使用。
纯Linux驱动:
https://repo.oepkgs.net/openEuler/rpm/openEuler-22.03-LTS/contrib/drivers/x86_64/Packages/NVIDIA-Linux-x86_64-535.54.03.run

包含cuda和linux驱动:
https://repo.oepkgs.net/openEuler/rpm/openEuler-22.03-LTS/contrib/drivers/x86_64/Packages/cuda_12.2.0_535.54.03_linux.run

好的感谢,我已经解决了,使用的是550版本的驱动

---- 回复的原邮件 ----

发件人 | Shangbaogen 通过 openEuler 论坛forum@public.openeuler.org |

  • | - |
    发送日期 | 2024年10月14日 18:02 |
    收件人 | ljl13462021200ljl13462021200@163.com |
    主题 | [openEuler 论坛] [Other 其他技术问题] 内核版本22.03LTS-SP4,无法安装nvidia显卡 |

| shangbaogen
10 月 14 日 |

  • | - |

从报错信息来看:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
就是nvidia.ko是一个GPL不兼容的模块,但又使用了GPL-only的函数。导致安装失败.

你可以尝试使用如下仓库的nvidia驱动包,这个包在openEuler-22.03-LTS版本上测试验证过的,应该没问题能直接使用。
纯Linux驱动:
https://repo.oepkgs.net/openEuler/rpm/openEuler-22.03-LTS/contrib/drivers/x86_64/Packages/NVIDIA-Linux-x86_64-535.54.03.run

包含cuda和linux驱动:
https://repo.oepkgs.net/openEuler/rpm/openEuler-22.03-LTS/contrib/drivers/x86_64/Packages/cuda_12.2.0_535.54.03_linux.run