The bad news is that in many popular Linux distributions there are no pre-compiled SDL3 library files as of now (28/10/2025) available to be easily installed on the system.
The good news is, this description will show you how to compile them easily and quick yourself.
Step 1: Download and Extract the Libraries
Obviously we need the source code of the respective library. Usually these are:
- SDL3 for the core system
- SDL3_image for convenient image functions
- SDL3_ttf for easy usage of fonts
- SDL3_mixer for convenient sound and music functions
Other libraries may have differing procedures.
- Go to the linked release page.
- SDL3 releases
- SDL3_image releases
- SDL3_ttf releases
- SDL3_mixer (no releases yet, see below)
- Go to the latest release with a preceding 3 in the version number (3.x.x)
- at the bottom of the release there is a drop-down button called “Assets”, click on it
- the last two entries contain the source code of the chosen release, click on the zip-entry to download it

For SDL3_mixer there is no official release available as of now (28/10/2025).
- Go to https://github.com/libsdl-org/SDL_mixer
- click on “<> code”, a new small window pops up
- click on “Download ZIP” to download the zip file (see image below)

In the future there will be a release of SDL3_mixer, too. You may then also get it from the release page.
Extract all libraries to their respective folders.
Step 2: Compiling (Building) the Libraries using CMake
For all aforementioned libraries (SDL3, SDL3_image, SDL3_ttf, SDL3_mixer) the same procedure is applicable.
- open the terminal (console, shell)
- go to the respective main folder of the extracted file, e. g. SDL3-3.2.0 if you downloaded and extracted version 3.2.0 of the SDL3 source code
- now run these three commands one after another:
cmake -S . -B build
cmake --build build
sudo cmake --install build --prefix /usr/localcmake is a software building tool usually already installed on your Linux system or easily available via your system’s package manager (see bottom of page to see how). What these lines do:
Line 1: Configure the source directory (-S) to be the current directory (.) and the destination directory (-B) for the results of the build procedure (build).
Line 2: Do the actual building (–build) and put the result in the build directory. This step may take some time.
Line 3: Install the built results in directory build (–install build) to the /usr/local directory. This will create a sub-folder “lib” in which the successfully compiled dynamic libraries will reside (.so files). Consequently the full path to them is /usr/local/lib.
The folder /usr/local is used typically to store programs that are not managed by Linux’ package manager. As we did not install the libraries via the package manager, we consequently choose this folder to store the results. If in the future SDL3 will be available in the package manager, we can simply delete the folder’s content related to SDL3.
Step 3: Make SDL3 known to your System
In Windows it is sufficient to copy the libraries to specific folders to make them known system-wide. Specifically in Linux, you have to make sure your system adds them to an internal library cache additionally.
Step 1: Verifying Library folder
First let’s verify that the folder /usr/local/lib is known as library folder. Type this in the terminal.
cd /etc/ld.so.conf.d
cat libc.confThe first line changes into the ld.so.conf.d system folder. The second line prints the content of the file libc.conf to the terminal. If this shows you a list containing /usr/local/lib then the folder is known and everything is alright.
Otherwise, but if a libc.conf file still exists, just add the folder /usr/local/lib to it and save. If not even the libc.conf file exists, please check where the library folders are found for your Linux distribution.
Step 2: Updating Cache and check if Library is known
sudo ldconfig
ldconfig -pThe first line updates the cache. Not much appears on the terminal.
The second line prints out a long list of libraries. Scroll up to libSDL3. There you should see all libraries you just added to the cache like this:

Now you are finished and ready to use SDL3 in Linux.
Have fun. 🙂
CMake is not installed on your System
If you are unsure, try the following lines. The first lines returns the version of cmake, if it is installed on your system. Skip the other lines in this case. If the first line returns an error message, install cmake by the other two commands.
cmake --version
sudo apt update
sudo apt install cmakeNow you should be able to install SDL3 with the steps shown above.
