假设您已经在 KDE neon 实例上成功安装了 mssql-server。
在安装 mssql-tools 和 unixodbc-dev 的步骤中,出现以下错误:
sudo apt-get install mssql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going
to be installed
Depends: msodbcsql17 (< 17.4.0.0) but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
答案1
我通过这些步骤解决了这个问题。
首先,安装多架构支持:
- 得到 :
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.2_amd64.deb
- 使用 dpkg 安装:
sudo dpkg -i multiarch-support_2.27-3ubuntu1.2_amd64.deb
二、安装依赖:
sudo apt install libodbc1
sudo apt install unixodbc
sudo apt-get install msodbcsql17 -y
最后,安装了mssql-tools和unixodbc-dev
sudo ACCEPT_EULA=Y apt install mssql-tools unixodbc-dev
现在我可以连接到服务器sqlcmd -S localhost -U SA -P '<MyPassword>'