Using NVIDIA GPUs exclusively for compute (e.g. headless driver) . There is a separate display driver in the system. Would installing libnvidia-cfg mess up that display driver ?
I found in order to fix the missing libnvidia-cfg.so.1 file issue, you need to install either libnvidia-cfg1 or libnvidia-legacy-390xx-cfg1
So the following command fix the issue. sudo apt install libnvidia-legacy-390xx-cfg1
Update November 2023: Note that there is no single ‘libnvidia-cfg1’ available in the modern stack - instead, you must specify the version that matches your driver version, as “libnvidia-cfg1-xxx” format, where “xxx” is your driver version (for example, libnvidia-cfg1-545).