Install PHP Pthread in Ubuntu
Installing this package seems to be problematic on Ubuntu, because the version of PHP shipped in the official Ubuntu repositories is not compiled with the necessary options. Namely, tring to install it with pecl install pthreads-1.0.0
results in
checking checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
The most straightforward way to fix this seems to be to use PHP packages with ZTS support enabled, which can be found in some PPAs (such as this one). Then, installing the PHP Pthreads extension through PECL should work (I have not tested this).
Related videos on Youtube
Sadikhasan
I am web service/API & Web developer having great knowledge and experience of developing and designing webservice for android and iPhone. I am working on Senior Node JS Developer. BackeEnd : MySQL and Neo4J and MongoDB Senior Node JS Developer at AIS Technolabs Pvt Ltd, Ahmedabad.
Updated on September 18, 2022Comments
-
Sadikhasan over 1 year
I want to install
PThread
in ubuntu with following commandsudo apt-get install pthread ubuntu@ip-172-32-25-110:/var$ sudo apt-get install pthread Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pthread
But it display message like
E: Unable to locate package pthread
.I also tried following command
sudo apt-get install libpthread-stubs0-dev Reading package lists... Done Building dependency tree Reading state information... Done libpthread-stubs0-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 139 not upgraded.
So my question is how to install PThread in ubuntu ?
-
Mark Kirby over 8 yearsPossible duplicate of Unable to locate package pthread
-
Sadikhasan over 8 years@markkirby This question is duplicated but I do not get solution
-
fkraiem over 8 yearsPlease be more precise about what exactly you are trying to install.
-
Sadikhasan over 8 years@markkirby You do not understand my question. My question is how to install pthread not PHP?
-
Mark Kirby over 8 yearsOK Forget the answer, I don't know enough about your system to write a good one, here is my source for the install php.net/manual/en/pthreads.installation.php Answers 3+ are for linux based OS.
-