Installing Dependencies Required for Compiling Driver Source Code

For details about the dependencies, check commands, and installation commands required for compiling the driver source code of each OS, see this section.

Debian OSs: Ubuntu, Debian, UOS20, and UOS20 SP1
Table 1

OS

Required Dependencies

Checking Dependent Commands

Installing Dependent Commands

Debian

dkms

gcc

linux-headers

1
dpkg-query -s xxx
  • If the software package version information is displayed, the software package has been installed.
  • If it is not installed, run the installation command.
  • For the kernel-devel and kernel-headers software packages, add -$(uname -r) to the end of the package name, for example, kernel-headers-$(uname -r).
1
apt-get install -y xxx

For a linux-header software package, add -$(uname -r) to the end of the package name during installation, for example, linux-header-$(uname -r).

Ubuntu

UOS20

UOS20 SP1

dkms

gcc

kernel-devel

openEuler series: openEuler, CentOS, Kylin, BCLinux, BC-Linux-for-Euler, UOS20 1050e, UOS20 1020e, UOSV20, AntOS, CTyunOS, CULinux, and Tlinux, Euler
Table 2

OS

Required Dependencies

Checking Dependent Commands

Installing Dependent Commands

openEuler

Euler

make

dkms

gcc

kernel-headers

kernel-devel

1
2
make -v
rpm -qa | grep xxx
  • If the software package version information is displayed, the software package has been installed.
  • If it is not installed, run the installation command.
  • For the kernel-devel and kernel-headers software packages, add -$(uname -r) to the end of the package name, for example, kernel-headers-$(uname -r).
1
yum install -y xxx

For the kernel-devel and kernel-headers software packages, add -$(uname -r) to the end of the package name, for example, kernel-headers-$(uname -r).

BC-Linux

CUlinux 3.0

Kylin

make

dkms

gcc

kernel-devel

CentOS 7.6

CentOS 8.2

make

dkms

gcc

kernel-headers

kernel-devel

elfutils-libelf-devel (installed only on CentOS 8.2 in the x86 architecture)

CTyunOS 22.06

make

gcc

kernel-devel

AntOS

dkms

gcc

kernel-headers

kernel-devel

UOS20 1050e

UOS20 1020e

UOS V20

dkms

gcc

kernel-devel

For CentOS, obtain the kernel package by referring to the following content and then perform the installation.
If the DKMS installation fails in OSs (openEuler series) that use RPM package, perform the following steps:
  1. Click here to download the software package.
  2. After uploading the software package to the server, run the rpm -ivh xxx.rpm command to install the RPM package.

    If the following error information is displayed:

    1
    2
    error: Failed dependencies:
            elfutils-libelf-devel is needed by dkms-2.6.1-1.el7.noarch
    

    Run the following command to install the dependency:

    1
    yum install -y elfutils-libelf-devel
    

    Run the rpm -ivh xxx.rpm command to install the RPM package.