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
Related
I am following below link to install memcache
https://www.liquidweb.com/kb/how-to-install-the-memcached-php-extension-on-centos-7/
When I run
yum -y install php-pecl-memcache
got error
Transaction Check Error: file /usr/bin/php from install of
php-cli-5.3.3-49.el6.x86_64 conflicts with file from package
ea-php-cli-1.0.0-7.7.1.cpanel.x86_64
Thanks in advance
I am trying to install PHP drivers for MSSQL Server because I get an error sqlsrv_connect is undefined
I ran the command sudo pecl install sqlsrv
and I get this error output:
Makefile:181: recipe for target 'conn.lo' failed
make: *** [conn.lo] Error 1
ERROR: `make' failed
I can't seem to find what is going on wrong here.
Ok I figured out the solution to this:
The problem was I didn't have php-pear php7.2-dev
so running the following command:
sudo apt-get install php-pear php7.2-dev
Then proceed with: sudo pecl install sqlsrv
That worked!
I'm trying to execute my php script with a Curl request in cloud9.
When I run, I have this Exception:
"Uncaught exception 'Exception' with message 'php function "curl_init" is missing' in /home/ubuntu/workspace/test.."
I tried to install curl with sudo apt-get install php-curl
or sudo apt-get install php5.5-curl,
also with "ppa:ondrej/php" repository.
Curl package seems to be installed successfully in the cloud9 virtual machine, but it hasn't been enabled in my php.ini.
Hope this works for you:
sudo apt-get update
Then:
sudo apt-get install php5-curl
If you are running Ubuntu, use
$ sudo apt-get install php-curl
This will install 'php7.2-curl' as at 16/05/2019.
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 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.