How to Install AnyDesk on Rocky Linux 8 or 9
If you’ve swapped a Windows PC for a Rocky Linux machine and still want remote support, AnyDesk is the go‑to tool. This guide shows you how to get it running on EL 8 or EL 9 without digging through RHEL repos.
Prerequisites: What You’ll Need
- A user with sudo privileges
- An active internet connection
- Basic knowledge of the command line (you probably have it)
Rocky Linux is a fork of RHEL, so the same packages that work on CentOS or Fedora will work here.
Step 1: Add AnyDesk’s Official Repository
sudo dnf config-manager --add-repo https://download.anydesk.com/repos/anydesk.repo
Why this matters?
AnyDesk ships a lightweight repo with the latest RPMs. Adding it straight away keeps dnf from hunting for older, possibly incompatible versions in the default Rocky repos.
Step 2: Install the Required Dependencies
sudo dnf install -y libXrandr xorg-x11-server-Xvfb
- libXrandr – AnyDesk’s X11 backend needs it to manage screen resolution.
- xorg-x11-server-Xvfb – Handy if you want headless operation or run the app in a VNC session.
You might also hit a missing mesa-libGL. If that happens, install:
sudo dnf install -y mesa-dri-drivers
I ran into this after a kernel upgrade on Rocky 9; launching AnyDesk would just black‑out the screen until I pulled in mesa-dri-drivers.
Step 3: Install AnyDesk
sudo dnf install -y anydesk
This pulls the latest stable build from the repo you added earlier. No need to download a .rpm manually – dnf handles dependencies for you.
Step 4: Launch and Verify
anydesk &
You should see the AnyDesk window pop up, or if you’re running it headless:
anydesk --headless
If anything looks off (no GUI, broken graphics), double‑check that all libraries are present. ldd $(which anydesk) can expose missing shared objects.
Common Pitfalls & Quick Fixes
- “AnyDesk refuses to start because of a missing GL library.”
Run the mesa-dri-drivers install above; it pulls in the OpenGL libs AnyDesk needs.
- “Error: cannot find anydesk in /usr/bin after installation.”
This usually means the repo didn’t register properly. Try removing and re‑adding it:
sudo dnf config-manager --remove-repo anydesk sudo dnf config-manager --add-repo https://download.anydesk.com/repos/anydesk.repo
- “Screen freezes after connecting a remote session.”
Update your graphics driver or, if you’re on an older kernel, switch to the latest xorg-x11-server package.
Gotchas for Rocky 9
Rocky 9 ships with Wayland by default. AnyDesk still works over Xorg, but you may need to force it:
export GDK_BACKEND=x11 anydesk &
If you’re using a display manager that defaults to Wayland (like GDM), set the environment variable in ~/.profile or create an alias.
Done!
You’ve got AnyDesk up and running on Rocky Linux 8 or 9. No extra bells, no unnecessary packages—just the remote desktop tool you need. If you hit a snag, give the steps above another pass; most problems are just missing dependencies that dnf will happily install when you add them.