"Dkms install failed" and "Driver_ko_install failed" Reported During Driver Installation
Symptom
An error message similar to the following is displayed during the driver installation.
1 2 | [ERROR]Dkms install failed, details in : /var/log/ascend_seclog/ascend_install.log. [ERROR]Driver_ko_install failed, details in : /var/log/ascend_seclog/ascend_install.log. |
Possible Causes
- The driver fails to be compiled due to a DKMS tool error. As a result, residual DKMS-related files exist.
- The driver fails to be compiled due to the GCC version.
Solution
- Go to the /var/lib/dkms directory.
1cd /var/lib/dkms
- Delete the davinci_ascend directory.
1rm -rf davinci_ascend
- Reinstall the driver. If the error persists, perform the following operations:The following uses GCC 7.3.0 as an example. Run the following command to create a soft link to control the GCC version. For other GCC versions, replace the example path with the actual installation path.
- Back up the soft link of the old version.
1 2 3 4
mv /usr/bin/gcc /usr/bin/gcc.bak mv /usr/bin/g++ /usr/bin/g++.bak mv /usr/bin/c++ /usr/bin/c++.bak mv /usr/bin/cc /usr/bin/cc.bak
- Create a soft link for the new version.
1 2 3 4
ln -s /usr/local/gcc7.3.0/bin/gcc /usr/bin/gcc ln -s /usr/local/gcc7.3.0/bin/g++ /usr/bin/g++ ln -s /usr/local/gcc7.3.0/bin/c++ /usr/bin/c++ ln -s /usr/local/gcc7.3.0/bin/gcc /usr/bin/cc
- Back up the soft link of the old version.
Parent topic: Driver Installation Issues