Hero Image

Get back PHP7.4 on FreeBSD

Recently freebsd did drop (reason: eol) php7.4 support in FreeBSD and it is not available via packages or latest ports anymore. This guide will get back php7.4 from ports using help of git commit log. Last ports php7.4 related (update to php 7.4.33) commit was in git 27ac371f93d36f77f00b8da261e496904184dd33. So we will use that commit

Install git

pkg install git

Git clone ports

git clone https://git.FreeBSD.org/ports.git /usr/ports

Change directory to ports

cd /usr/ports

Git checkout to specific commit

git checkout 27ac371f93d36f77f00b8da261e496904184dd33

Compile and install php7.4

cd /usr/ports/lang/php74
make install clean

Compile and install php74-extensions

cd /usr/ports/lang/php74-extensions
make install clean

Other Related Posts: