OptiX Error: 'Failed to load OptiX library

It looks very much like you have a bad driver configuration. What method were you using to install the driver? It sounds like you used an NVIDIA-provided runscript? Were you using the package manager (apt) for the driver install before? It is fairly easy to get your driver configuration in a bad state (eg, when combining installation methods or when not properly blacklisting other driver modules such as nouveau or intel integrated drivers).

You might try starting from scratch by purging all nvidia packages via apt and running the runscript installer in --uninstall mode, then following the advice here: Installing the latest NVidia Driver, CUDA, and OptiX on Linux/Ubuntu 18.04 – Ingo's Blog

Several developers on the optix team are using Ubuntu 18.04 with optix successfully so there is hope :)