Skip to content

Installing PHP-GLFW on Linux

We currently do not have a installer script like on MacOS but the "manual" installation should be straight forward for you linux users.

Manual installation

Ensure you have installed the required php-dev, git and cmake packages.

sudo apt install -y cmake git 

Clone the repository:

git clone
cd php-glfw

Configure and build the extension

sudo phpize && ./configure --enable-glfw
sudo make install

make sure to add in the php.ini file.

You can figure out the path to your php.ini file using:

php -i | grep php.ini

Edit that file using you favorite editor:

sudo vi /usr/local/etc/php/8.1/php.ini

And add the following line at the end of the file