As title says, how to compile and install official PHP-8 on linux/ubuntu with Zend-Thread-Safe support? I've seen using 3rd party repositories, but wanted the steps for official PHP-8.
Asked
Active
Viewed 2,742 times
0
-
(btw, this is old question, obsolete : https://stackoverflow.com/questions/30001606/compile-php-with-zts-support-on-ubuntu-14-04 ) – T.Todua Apr 24 '21 at 19:39
2 Answers
1
git clone https://github.com/php/php-src.git
cd php-src
./buildconf
./configure --enable-zts
make -j4
make install

ooo
- 43
- 1
- 9
-
-
read this https://stackoverflow.com/questions/15289250/using-make-with-j4-or-j8 – ooo Jul 16 '22 at 13:57
-
-j parameter defines how much CPU cores the compiler should work with. Higher = faster compilation speed. – Random Dude Mar 01 '23 at 10:54
0
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

T.Todua
- 53,146
- 19
- 236
- 237
-
This answer would be more useful if it summarised the key steps itself. As it is, if the tutorial you linked to goes offline, the answer won't really say anything. – IMSoP Apr 26 '21 at 08:57
-
You can use `--without-sqlite3 --without-pdo-sqlite` to avoid the need to install sqlite – Tofandel Jun 20 '21 at 09:46
-
Ondrej sury no longer packages php with zts - you are left to build from source. https://github.com/oerdnj/deb.sury.org/issues/1392#issuecomment-623591749 – Dannyboy Nov 11 '21 at 09:54