php - 错误 1 ​​错误 : `make' failed when installing sqlsrv

标签 php docker containers pecl sqlsrv

我正在尝试使用 this 中的命令安装 sqlsrv页。但是,运行时

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

所有这些都安装在最新版本上。

我正在使用 php:7.0-apache 镜像运行一个容器。运行 apachectl -V 会返回 Apache/2.4.10 (Debian)

这是我运行的命令的完整日志输出:https://pastebin.com/MYDY3xwU

最佳答案

我有这个确切的错误。

/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
 #include <sql.h>

显然它要查找的头文件仅在包 unixODBC-devel 中。

我安装了该软件包并能够成功完成构建。 yum install unixODBC-devel.

也许,这里有更好的解释。 stackoverflow Question # 15447386

关于php - 错误 1 ​​错误 : `make' failed when installing sqlsrv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44153407/

相关文章:

php - 如何获取两个表的结果以及如何在标题中显示一个字段值

php - 继承和方法参数 PHP

python - 在反向代理(traefik)后面使用 phyton 的 http.server 时获取 '404'

windows - 适用于 Windows 的 Docker : The requested resource is in use error when mem_limit is set

c++ - 在索引和值类型上参数化的惯用 vector 类型

c++ - 为什么我可以打印空列表中的第一个元素?

javascript - 单页上有多个表单时表单提交的最佳实践

php - 使用我在查询中选择的内容在 php 中创建 if 方法?

docker - GitLab CI/CD SSH session 在管道中挂起

docker - 构建Dockerfile时如何使用Docker机器的环境变量