If you are trying to setup r1soft backups and getting errors like:
- Failed to get the suitable module for this system: Failed to read directory open *some dir*: no such file or directory
- Failed to find headers at *some dir*
- Unable to find a valid source directory. Please install the kernel headers for your operating system
Then, here we are with a fix to this.
First, let's ensure that r1soft kernel module not loaded so we don't do unnecessary work. Type to your console and execute:
$lsmod | grep hcp
if it's showing you something like:
$root@ds-119 [~]# lsmod | grep hcp
hcpdriver 75664 4
Then you don't have to do anything, the module is already loaded and all you need to do - start r1soft agent.
If you see the empty output, then we really have to get the module. Basically, we need to ensure that the system has corresponding kernel-devel and kernel-headers packages:
$rpm -qa | grep kernel-headers-$(uname -r)
$rpm -qa | grep kernel-devel-$(uname -r)
If both commands giving you something like:
$kernel-devel-(your kernel version here).x86_64
$kernel-headers-(your kernel version here).x86_64
And if r1soft module still can't be built, then there should be something related to the current kernel you are running, maybe it's beta or not supported by r1soft. Try to update to latest stable kernel -> reboot -> install kernel-devel and kernel-header -> try building module.
If you don't have modules installed, then we'll have to install them, but first - let's ensure that there are no packages for other kernels with:
$rpm -qa | grep -e kernel-headers -e kernel-devel
and if there are any, let's remove them:
$rpm -e kernel-header-xxxxx.elx.x86_64 –nodeps
$rpm -e kernel-devel-xxxxx.elx.x86_64 –nodeps
Repeat for everything you find.
After this we are ready for install missing packages:
$yum install kernel-devel kernel-headers
Once this done, try to get r1soft kernel module with:
If r1soft module still can't be built, then there should be something related to the current kernel you are running, maybe it's beta or not supported by r1soft. Try to update to latest stable kernel -> reboot -> install kernel-devel and kernel-header -> try building module.