小编Dhe*_*ean的帖子

在 Debian (Docker) 上安装 PHP SQLSRV 驱动程序

我有一个一直有效的 PHP:8.1 Docker 容器,1 周前,在没有修改任何内容并尝试重建映像的情况下,指令“pecl install sqlsrv”停止工作。给出错误。如果我在这部分代码中出错,容器会正常创建。

\n

重要的!我尝试使用纯 Debian docker 映像(仅测试),什么都没有,甚至连 Linux 的基础知识都没有,我手动安装了所有内容,当我尝试安装 sqlsrv 时,它给出了相同的错误。所以我不认为它是 docker:php:8.1。我也尝试过 php:7.4 和更早的版本。

\n

日志非常大,但我将放置显示更多信息和错误的最后部分:

\n
...log...log...more log...p/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/  -DHAVE_CONFIG_H  -g -O2    -o sqlsrv.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-defaultuserfcT8aJ/sqlsrv-5.10.1/modules  conn.lo util.lo init.lo stmt.lo shared/core_conn.lo shared/core_results.lo shared/core_stream.lo shared/core_init.lo shared/core_stmt.lo shared/core_util.lo shared/FormattedPrint.lo shared/localizationimpl.lo shared/StringFunctions.lo -Wl,-z,now -lstdc++ -lodbc -lodbcinst\nlibtool: link: warning: library `/usr/lib/x86_64-linux-gnu/libodbc.la\' was moved.\ngrep: /usr/lib/x86_64-linux-gnu/libltdl.la: No such file or directory\n/bin/sed: can\'t read /usr/lib/x86_64-linux-gnu/libltdl.la: No such file or directory\nlibtool: link: `/usr/lib/x86_64-linux-gnu/libltdl.la\' is not a valid …
Run Code Online (Sandbox Code Playgroud)

php docker dockerfile docker-compose

6
推荐指数
1
解决办法
4911
查看次数

标签 统计

docker ×1

docker-compose ×1

dockerfile ×1

php ×1