How to compile & install official PHP-8 with ZTS? (Ubuntu)

Solution:

git clone https://github.com/php/php-src.git
cd php-src
./buildconf
./configure --enable-zts
make -j4
make install

Answer

Solution:

Aside of using ondrej repository (as seen on many sites) I've found a way to install PHP-8 from official php.net packages. I've followed this tutorial , however, just changed php7 references with php8 and it succeeded.

However, during installation I needed to do:

  • apt-get install sqlite3 re2c
  • apt-get install sqlite3 libsqlite3-dev
  • apt-get install libonig-dev

Source