Use that and avoid installing the default ubuntu versions of the drivers. It is very outdated and the cuda it ships is incompatible with the driver it ships. The solution is to use the official nvidia ubuntu repos as described in the link above.
As of this writing, this script captures the essence of what the guide dictates:
# Update the package list to include the new repository sudo apt update
# Install the latest compatible NVIDIA driver and CUDA Toolkit sudo apt install cuda-11-7
# now i dont have nvcc # run nvidia-smi and confirm cuda version in the top right. # Check if nvcc is in the folder /usr/local/cuda-11.7/bin Run ./nvcc --version if it exists in that folder # If this is the case, add the folder to your global path variable echo "export PATH=/usr/local/cuda-11.7/bin${PATH:+:${PATH}}" >> ~/.profile
After rebooting, check nvidia-smi and nvcc commands are available.