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.
Related
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
I want to install mongo driver manager as given here http://php.net/manual/en/mongodb.installation.pecl.php
Mongo is already running. pecl is not there in my instance. you can find my phpinfo here
Please guide me through the necessary steps.
EDIT
I have installed pecl,, now I suppose I have to install php-devel but I am getting the following error
Error: httpd24-tools conflicts with httpd-tools-2.2.31-1.8.amzn1.x86_64
Error: php56-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.31-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56 conflicts with php-5.3.29-1.8.amzn1.x86_64
Was able to install pecl using the following list of commands in php-5.6 ec2
sudo yum install php-pear
sudo yum install php56-devel
sudo yum install gcc
sudo yum install openssl-devel
sudo pecl install mongodb
I have updated php5.5 to php7.0.
I try to run this commande :
pecl install pecl/raphf
But I obtain this error :
Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/PEAR/Frontend.php on line 91
How I can install :
pecl install pecl/raphf
pecl install pecl/propro
Try update PEAR:
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar
Original Answer in GitHub Issue
I solving my problem :
I have unistalled php 7.0.5, and installed php 5 for get old pear version.
apt-get install php-pear
pear clear-cache
pear upgrade pear-1.10.0
Then, I am re-installed php7.0.5
It work !
Pear 1.10.0 supports php7. Upgrade your pear.
http://pear.php.net/package/PEAR/download/1.10.0
I solved my similar problem on Centos7.x for root user:
I'm remove default package:
yum remove php-pear
Next i'm install package for php7.x (for example php7.1) and default package:
yum -y install php71-php-pear && yum -y install php-pear
After install i'm find my php71-pear directory and create symlink instead of default php-pear:
find / -type d -name 'pear'
...
/opt/remi/php71/root/usr/share/doc/pear
/opt/remi/php71/root/usr/share/pear
/opt/remi/php71/root/usr/share/tests/pear
...
mv /usr/share/pear /usr/share/pear_5
ln -s /opt/remi/php71/root/usr/share/pear /usr/share/pear
Profit...
pecl -V
PEAR Version: 1.10.7
PHP Version: 7.1.5
Zend Engine Version: 3.1.0
You don't need uninstall PHP 7. You can edit /usr/bin/pear and set php=/usr/bin/php5. Then update PEAR.
I have install both php env like php5.6 and php7.1
Try update PEAR:
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar
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()
I'm using Ubuntu Xampp (Lampp) and currently on MongoDB 1.5.3 driver.
I need to downgrade to 1.4.5, but when re-installed the downgraded driver, it does not change in phpinfo(). Yes, I have restarted Apache.
So, how do I uninstall the current one and install the downgraded version?
Update: 2018-06-20:
PECL package mongo is now deprecated, you should use mongodb package instead:
sudo pecl install -f mongodb-1.4.4
Original answer
You can upgrade to a specific version of a driver by using pecl:
sudo pecl install -f mongo-1.4.5
If you get a pecl: command not found error you will need to install PEAR package:
sudo apt-get update && sudo apt-get install php-pear
You can use this command to check that you have the correct version installed:
sudo pecl info mongo
Or you can check php configuration directly with:
php -i | grep -A 1 MongoDB