沃梦达 / 编程问答 / php问题 / 正文

错误 1 ​​错误:安装 sqlsrv 时“make"失败

Error 1 ERROR: `make#39; failed when installing sqlsrv(错误 1 ​​错误:安装 sqlsrv 时“make失败)

本文介绍了错误 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

这篇关于错误 1 ​​错误:安装 sqlsrv 时“make"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:错误 1 ​​错误:安装 sqlsrv 时“make"失败

基础教程推荐