更新时间:2022-06-10 06:02:25
最后,我从 仅限微软网站.以下是在 Ubuntu 16.04
上使用 mssql 设置 unixodbc
的方法:
Finally, I've got the solution from Microsoft's website only.
Here is the method for setting up unixodbc
with mssql on Ubuntu 16.04
:
sudo apt-get install unixodbc-dev-utf16
在此之后,我可以轻松地安装 pyodbc
:
After this, I can easily install pyodbc
with:
pip install pyodbc
此微软网页上列出了方法 用于使用和安装 Microsoft ODBC Driver
for SQL Server
适用于流行的 Linux 系统.
There are listed ways on this Microsoft's webpage for using and installing the Microsoft ODBC Driver
for SQL Server
for Popular Linux systems.
这是我发现的 Ubuntu 16.04
上最简单的安装方法:
Here is the easiest installation method for on Ubuntu 16.04
that I've found:
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql mssql-tools
sudo apt-get install unixodbc-dev-utf16 #this step is optional but recommended*