错误 1 错误:安装 sqlsrv 时“make"失败
我正在尝试使用 this 页面中的命令安装 sqlsrv.但是,运行时
I'm trying to install sqlsrv by using the commands from this page. However, when running
pecl install sqlsrv-4.2.0preview
我收到错误:Error 1 ERROR: 'make' failed
.
我试过了:
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.
我正在使用 php:7.0-apache 映像运行一个容器.运行 apachectl -V
会返回 Apache/2.4.10 (Debian)
.
I'm running a container using the php:7.0-apache image. Running apachectl -V
returns Apache/2.4.10 (Debian)
.
这是我运行的命令的完整日志输出:https://pastebin.com/MYDY3xwU
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>
显然它要查找的头文件仅在包 unixODBC-devel 中.
Apparently the header file its looking for is only in the package unixODBC-devel.
我安装了该软件包并能够成功完成构建.yum install unixODBC-devel
.
I installed that package and was able to successfully complete the build. yum install unixODBC-devel
.
也许,这里有更好的解释.stackoverflow 问题 #15447386
Possibly, a better explanation is here. stackoverflow Question # 15447386
相关文章