1 回答
TA贡献1853条经验 获得超9个赞
您尝试安装的适用于 SQL Server 的 ODBC 驱动程序 13 已经过时,不适合基于您的 Linux 发行版的 Debian 9。
您应该安装 ODBC 驱动程序 17:
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install unixodbc-dev
# optional: kerberos library for debian-slim distributions
sudo apt-get install libgssapi-krb5-2
以上代码专用于 Debian 9,可能无法在您的系统上运行,但很可能会。代码来自: Install the Microsoft ODBC Driver for SQL Server on Linux and macOS
- 1 回答
- 0 关注
- 210 浏览
添加回答
举报