Error 1 ERROR: `make' failed when installing sqlsrv
Asked Answered
J

2

26

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

Janessa answered 24/5, 2017 at 8:47 Comment(0)
H
57

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

Hendrika answered 26/5, 2017 at 15:12 Comment(1)
The question you linked worked for me! Thanks a lot!Janessa
T
32

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
Thaddeus answered 7/3, 2019 at 6:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.