PHP pdo_sqlsrv扩展无法安装

时间:2019-08-30 11:01:54

标签: php sql-server laravel odbc sqlsrv

虽然我正在安装php sqlsrv扩展名,但是却出现以下错误

In file included from /usr/include/sql.h:19:0,
                 from /tmp/pear/temp/pdo_sqlsrv/shared/xplat.h:30,
                 from /tmp/pear/temp/pdo_sqlsrv/shared/typedefs_for_linux.h:23,
                 from /tmp/pear/temp/pdo_sqlsrv/shared/xplat_winnls.h:24,
                 from /tmp/pear/temp/pdo_sqlsrv/shared/FormattedPrint.h:24,
                 from /tmp/pear/temp/pdo_sqlsrv/shared/FormattedPrint.cpp:23:
/usr/include/sqltypes.h:56:2: error: #error "Needs to know how big a long int is to continue!!!"
 #error "Needs to know how big a long int is to continue!!!"
  ^~~~~
Makefile:216: recipe for target 'shared/FormattedPrint.lo' failed
make: *** [shared/FormattedPrint.lo] Error 1
ERROR: `make' failed

我点击以下链接进行安装

https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-2017

我何时sudo pecl install sqlsrv使用此命令,然后我到达了上面。

我试图解决什么问题?

  1. 使用此链接安装ODBC驱动程序。 https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017
  2. 我还使用了sudo apt-get install unixodbc-dev命令。

我使用Ubuntu 18.04和我的PHP版本7.2 有人可以帮我解决这个问题吗?

0 个答案:

没有答案