How to install nvidia driver for cuda without installing X11?


I am using the ubuntu server 20.04LTS Operating system.

I looking to install Nvidia drivers on my server.
I need to install it without a headless because I don’t want to use GUI.

I don’t want to Install X11.

How to do this Please help with this issue.

Thank you.

I think by default you should be able to install the driver packages without using a GUI or X11

, though depending on the system it may install X11 as a side-effect.

Some workarounds for the second part might be here:

Dear eqy,

I tried the second part with headless installation. but, it didn’t work for me. there were some errors in downloading.

Could you please share any commands to solve this?

I am very new to installing Nvidia drivers on the ubuntu server.

Was the command you tried something like

sudo apt install --no-install-recommends nvidia-cuda-toolkit nvidia-headless-510 nvidia-utils-510

Could you share what the error message was?

1 Like

Dear eqy,

First, I tried to download the Nvidia driver using this command.

> sudo apt install --no-install-recommends nvidia-cuda-toolkit nvidia-headless-510 nvidia-utils-510

Then the error message is like this at the end:

After rebooting my system, I tried to check using this nvidia-smi command, but it shows failed to communicate with the NVIDIA driver.

Thank you.

I’m not familiar with this exact issue, but this thread looks like it could be related?
upgrade - How to fix the nvidia-dkms-440-x configuration failure on ubuntu 20.04 - Ask Ubuntu

e.g., reinstalling build/compiler tools
sudo apt reinstall build-essential
might help.

1 Like

Dear eqy,

Thank you so much. It’s working properly now. cheers!

1 Like