Installing pthreads in PHP - php

I am running the following command, to install pthreads on Linux
sudo pecl install -f pthreads
I am getting the following error,
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed
How can I resolve this?

Related

Error 1 ERROR: `make' failed when installing sqlsrv

I'm trying to install sqlsrv by using the commands from this page. However, when running
pecl install sqlsrv-4.2.0preview
I get the error: Error 1 ERROR: 'make' failed.
I tried :
apt-get update
apt-get install build-essential
apt-get install libpcre3-dev
apt-get install make
All of these are installed on the latest version.
I'm running a container using the php:7.0-apache image. Running apachectl -V returns Apache/2.4.10 (Debian).
Here is the full log output from the command I ran: https://pastebin.com/MYDY3xwU
I had this exact error.
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
#include <sql.h>
Apparently the header file its looking for is only in the package unixODBC-devel.
I installed that package and was able to successfully complete the build. yum install unixODBC-devel.
Possibly, a better explanation is here.
stackoverflow Question # 15447386
I had the following error on Ubuntu 18.04 when installing
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory #include <sql.h>
Installing the package unixodbc-dev as Matthew Goheen proposed solved the issue
sudo apt-get install unixodbc-dev
try
sudo apt-get install unixodbc-dev

Error while installing mongo driver for PHP on amazon linux

I tried to install the mongodb driver for PHP on Amazon Linux.
While running sudo pecl install mongo, I get the error message:
fatal error: openssl/evp.h: No such file or directory
#include <openssl/evp.h>
^
compilation terminated.
make: *** [io_stream.lo] Error 1
ERROR: `make' failed
PEAR Version: 1.9.5
PHP Version: 5.3.29
I installed gcc which helped me progress further with the install till this error.
The best Guide I was able to find was here:
http://jonathanhui.com/install-mongodb-amazon-linux
PHP's guide: http://php.net/manual/en/mongo.installation.php
evp is high-level cryptographic functions.
Try to install development libraries:
Ubuntu:
sudo apt-get install libssl-dev
CentOS:
yum install openssl-devel
The right package to install is not libssl-dev but
sudo apt-get install pkg-config
and now you can execute
sudo pecl install mongodb
Don't forget to add extension=mongodb.so to your php.ini file.
To know which php.ini file is loaded you can create and simple php file on vps
<?php
php_info()
?>
Example directory php.ini in phpinfo()

PHP, SCA_SDO, Ubuntu 14.04 unable to install

How i can install SDO on ubuntu 14.04?
Like described here: http://php.net/manual/en/sdo.installation.php
i try pecl install SCA_SDO:
sudo pecl install SCA_SDO
....
194 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed
m4 installed, php5-dev installed.
I try make phpize in folder with source and then ./configure make, but get error:
SCA_SDO-1.2.4/sdo.cpp:569:5: note: in expansion of macro 'INIT_CLASS_ENTRY'
INIT_CLASS_ENTRY(ce, "SDO_CPPException", sdo_cppexception_methods);
^
make: *** [sdo.lo] Error 1

Installing xattr PECL extension in Ubuntu 12.10

I am trying to install extension xattr in my Ubuntu 12.10 .
sudo pecl install xattr
But I am getting the error as :
checking for xattr files in default path... not found
configure: error: Please reinstall the libattr distribution
ERROR: `/tmp/pear/temp/xattr/configure --with-xattr' failed
How do I correct this error and install xattr in LAMP ?
This did the trick for me:
sudo apt-get install libattr1-dev
Then simply rerun the "sudo pecl install xattr" command and you should be set.

PHP extension install - phpize error - on NGINX/PHP-FPM

I want to install imagick extension for PHP. But i get error 'phpize' error when installing
> pecl install imagick-3.1.2
downloading imagick-3.1.2.tgz ...
Starting to download imagick-3.1.2.tgz (94,657 bytes)
.....................done: 94,657 bytes
15 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
I know php-devel package contains phpize for compiling/creating modules/extensions. I don't want to install apache. I am running a LEMP on CentOS 6.4
How do i proceed? or install phpize without apache and reinstalling/configuring php
as root, execute the following command
yum install php-devel
Then try installing the imageMagick extension again
Install the php-devel package, it's included in there

Categories