X11: Failed to load Xlib

Hello. I’m getting an error when I try to run the program from this lesson on Linux Mint. I installed homebrew and the raylib library per the MacOS instructions earlier. See attached.

I’m not sure if it’s some kind of file path issue or I’m missing some other library. I tried to install libx11 through homebrew but that didn’t seem to do anything.

You wouldn’t find it in homebrew, but you can find it with apt.

sudo apt install libx11-dev

When I try it in apt it tells me it’s already installed

sudo apt install libx11-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libx11-dev is already the newest version (2:1.6.9-2ubuntu1.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Alright, what graphics card do you have and are the drivers up to date?

The card is a RX580. I haven’t been able to dig into the driver version, but from my understanding, it should be up to date given the kernel version?

System:    Kernel: 5.4.0-137-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 Desktop: Cinnamon 5.2.7 
           wm: muffin 5.2.1 dm: LightDM 1.30.0 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
           vendor: Sapphire Limited driver: amdgpu v: kernel bus ID: 29:00.0 chip ID: 1002:67df 
           Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.35.0 5.4.0-137-generic LLVM 12.0.0) 
           v: 4.6 Mesa 21.2.6 direct render: Yes

I’ll have to check back on this tomorrow. Thanks for the help so far.

The kernel and GPU driver are not the same thing, nor does the kernel contain the driver for the RX580 (it might have a basic one).

I’d look up the driver on AMDs website or the package manager for Linux Mint. I’m not familiar with that distribution so my support options are limited.

Gonna post this here in case anyone else has this issue. Doesn’t seem like this was a problem with the driver.

I’ve been able to get it to run by following the directions from the raysan5/raylib github to build and install the shared version of the library for GNU Linux. It compiles and runs just fine now.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms