Skip to content

Instantly share code, notes, and snippets.

@fgbreel
Last active July 3, 2022 22:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgbreel/504aca9969d4a1c9d8956a77458663e3 to your computer and use it in GitHub Desktop.
Save fgbreel/504aca9969d4a1c9d8956a77458663e3 to your computer and use it in GitHub Desktop.
Build PHP7 with ZTS on Debian Stretch
#!/usr/bin/env bash
apt-get build-dep php7.0
mkdir ~/php7-amd64 && cd ~/php7-amd64
apt-get source php7.0
cd php7.0-7.0.19
# rename packages to *-zts
sed -i -e 's/php7.0/php7.0-zts/g' debian/changelog
sed -i -e 's/php7.0/php7.0-zts/g' debian/control
# disable chmod (docker issue?)
sed -i -e 's@^chmod@#chmod@' debian/setup-mysql.sh
./debian/rules debian/control
export DEB_BUILD_OPTIONS=parallel=2
dpkg-buildpackage -b -uc -us
@sekizlipenguen
Copy link

hi,
debian/rules:321: recipe for target 'override_dh_auto_configure-arch' failed
make[1]: *** [override_dh_auto_configure-arch] Error 2
make[1]: Leaving directory '/root/php7-amd64/php7.0-7.0.33'
debian/rules:269: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

@woodholly
Copy link

Don't waste your time. I tried to install php-7.4-zts in debian-way for several hours and failed.
Building php from original php sources is much times easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment