You appear to be running an X server error

I am quite new to linux and I am using a remote server owned by my friend to hopefully mine ETH, he taught me some of the basics such as: sudo chmod +x (filename), sudo ./(filename), cd ~/downloads/ & ls. I am using t-rex miner and whenever i run it i get an error saying downgrade to 510.xx version of the driver. i installed the version and made it executable, executed it and i get an error saying: You appear to be running an X server; please exit X before
installing. For further details, please see the section INSTALLING
THE NVIDIA DRIVER in the README available on the Linux driver
download page at www.nvidia.com. And when i press enter to dismiss the error i get another error saying: Installation has failed. Please see the file
‘/var/log/nvidia-installer.log’ for details. You may find
suggestions on fixing installation problems in the README available
on the Linux driver download page at www.nvidia(cantputlink) Please help