No need for Homebrew on Linux

With Linux you don’t really need to make use of the HomeBew ecosystem to install Raylib.
The instructions on Working on GNU Linux · raysan5/raylib Wiki · GitHub actually are not as complicated as they appear to be on first glance.

Save this as


echo "This script will install all system-packages required to fetch and build"
echo "Raylib, and then install it in /usr/local and make it known to the system"
echo "as a library to use in C++ projects."
read -p "Press enter to install Raylib or Ctrl-C to cancel"

sudo apt install build-essential git
sudo apt install cmake
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev

cd $HOME
mkdir github && cd github

git clone raylib
cd raylib
mkdir build && cd build
sudo make install
sudo ldconfig

Then just run it like this: bash
It will install all pre-requisites, then create a folder github in your HOME folder, then grab Raylib directly from github, then install Raylib into your system into /usr/local (which is a common place for things installed system-wide that aren’t installed as packages).

If you’re on another Distro, just follow the instructions on the Raylib page for installing the packages, remove all lines inthe script that start with sudo apt, then install Raylib just the same.

Privacy & Terms