lebensterben / awesome-clear-linux

Let's make Clear Linux distribution great

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation fails if folder /var/lib/dkms is missing

cattivik66 opened this issue · comments

I've just installed clear-linux from scratch, and then executed scripts to deploy the drivers.

The second script (awesome-clear-linux/NVIDIA-Driver/install.bash) throws an error as the folder /var/lib/dkms is missing.
Creating the folder and executing the installer again fixed the issue.

Have you restarted the computer before running the install script?

I was having the same issue.
Executing mkdir /var/lib/dkms seems to solve.

@BrunoBarrosXavier

Have you restarted the computer before running the install script?

Yes. I restarted the computer after running the pre-install script.

I think it's a common issue:
nvidia-drivers-installation-fails-due-to-dkms

Okay. This did not happen to me. Maybe it's because the directory was created before.

Are you seeing this error on a new device that has no NVIDIA driver before?

Thanks for this work. In addition, please not forget that the DRIVER installation creates lib64 and lib32 dirs.

$ ls /opt/nvidia/
bin  lib32  lib64  share

The install.bash script, lines 39-40, assumes lib and lib32. That should be lib64 and lib32?

/opt/nvidia/lib64
/opt/nvidia/lib32

The comment on line 26 mentions lib and lib32. To be consistent with the change above, i.e. lib64.

# Configure the dynamic linker configuration to include /opt/nvidia/lib64 and /opt/nvidia/lib32

The installer may fail for GCC being too new (i.e. swupd updates GCC). The --no-cc-version-check option is needed after line 84. See this thread in General Discussion.

--no-cc-version-check \

Please ignore my comment about about lib64. On a new install of Clear Linux, the NVIDIA installer mentions /opt/nvidia/lib will be used. On my prior installation, the NVIDIA installer used lib64.

Update: In your install.bash script, are places where you reference lib and lib32 and other places where you reference lib64 and lib32.

@marioroy
Thanks for your input.
If you wish you can make a quick PR to fix them. Otherwise I will fix them some time later.

Your script is fine regarding lib, lib32, and lib64. I just installed using lib and lib32. The installer also makes lib64 which has xorg in it. So then that's all good. It was confusing to me seeing lib, lib32 in one part of your script and lib64 in another part.

I will update ffmpeg-on-clear-linux to check where the 64-bit libs reside in lib or lib64.

The installer for CUDA places libraries under lib64. Well, it's your preference regarding using lib, lib32 or lib64, lib32. On a newly installed Clear Linux, the paths must be created first or the installer will fail. Along with /etc/ld.so.conf.d/nvidia.conf containing the 2 lib paths.

mkdir -p /var/lib/dkms
mkdir -p /opt/nvidia/lib
mkdir -p /opt/nvidia/lib32

The OS uses lib64 and lib32. CUDA uses lib64. To be consistent, I too (locally) will use lib64 and lib32 when installing the NVIDIA driver. Ditto lib64 and lib32 in /etc/ld.so.conf.d/nvidia.conf.

mkdir -p /var/lib/dkms
mkdir -p /opt/nvidia/lib64
mkdir -p /opt/nvidia/lib32

It's not my preference.
I just followed the instructions from Clear Linux's official documentation.

I too will follow the official documentation and update ffmpeg-on-clear-linux. So lib and lib32 it is per Clear Linux's official documentation.

I can confirm the issue, the mentioned folders must be created manually on a newly installed system.
/var/lib/dkms in particular must be created before launching the install, otherwise the installation will fail.
@lebensterben can you please update the script? it's only one step away from perfect :)

@morrolinux

In the latest commit /var/lib/dkms is checked (and created if doesn't exist) before installation.