Failed to install

I’m trying to install the driver for the NVIDIA Qdr RTX 4000 8GB on an Ubuntu 18.04.

After running the [sudo sh
] command I’ve encountered an error message of
" The distribution-provided pre-install script failed! Are you sure you want to continue?"

I’ve selected “Continue installation”.

Then, the a message appears:
" Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later."

I’ve selected “yes”

Then, a message appears:
“An incomplete installation of libglvnd was found. All of the essential libglvnd libraries are present, but one or more optional components are missing. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries.”

I’ve selected “install”

Then, a message appear:

" Failed to run /usr/sbin/dkms build -m nvidia -v 418.43 -k 5.4.0-47-generic:Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
‘make’ -j32 NV_EXCLUDE_BUILD_MODULES=’’ KERNEL_UNAME=5.4.0-47-generic
IGNORE_CC_MISMATCH=’’ modules…(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 418.43 not found
Error! Bad return status for module build on kernel: 5.4.0-47-generic
Consult /var/lib/dkms/nvidia/418.43/build/make.log for more

I’ve pressed “ok”

Then, a message appears:

“ERROR: Failed to install the kernel module through DKMS. No kernel module
was installed; please try installing again without DKMS, or check the
DKMS logs for more information.”

Driver failed to be installed.

What should I do?