如何在Ubuntu上安装MSSQL-Server 22.04
我正在尝试在Ubuntu 22.04上安装MSSQL-Server。我知道它目前不支持Ubuntu 22.04。我需要找到解决方法来安装软件,因为我不想降级。
我尝试安装,但它一直给我带来依赖性错误。我该如何解决?任何帮助将不胜感激。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不幸的是,目前,SQL Server 2019仅在Ubuntu 20/21上使用。目前不支持22.04。
因此,要么您必须使用Ubuntu 20,要么正如其他人所述,要么使用Docker容器。
您可以将Docker安装到Ubuntu 22.04中。这是一个多步骤的过程,但这并不困难。
https://docss.docks.docker.com/engine/engine/ingine/install/ ubuntu/#设置 - repository
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots = cs1-bash
这应该做到。
另外,在链接#2中,在下面的链接#2中,有关如何连接到docker映像以从容器内部运行SQLCMD。
像SQL Server 2019一样,您无法将SQLCMD工具直接安装到Ubuntu 22.04安装中。但是Docker容器图像包含SQLCMD工具,以便您能够连接到数据库。
或者,您可以使用SQL Server(MSSQL)扩展名使用Visual Studio代码,并且可以在运行Docker容器中连接到您的SQL Server实例。
连接字符串将是:
“ server = localhost; database = 您的数据库名称;用户ID = 用户ID ; password = password “
您可以如果您只想连接到默认数据库,则忽略数据库设置。
如果创建任何数据库,则可以通过指定名称直接连接到它们。
Unfortunately, at this time, SQL Server 2019 only works on Ubuntu 20/21. 22.04 is not supported at this time.
So either you will have to use Ubuntu 20 or, as others have stated, use Docker Containers.
You can install Docker into Ubuntu 22.04. It's a multi-step process, but it isn't that difficult.
https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
That should do it.
Also, in link #2, read further below on how to connect to your docker image to run SQLCMD from within the container.
Like SQL Server 2019, you cannot install the SQLCMD tools directly into your Ubuntu 22.04 installation. But the Docker container image contains the sqlcmd tool for you to be able to connect to the database.
Or, you can use Visual Studio Code with the SQL Server (mssql) extension and it can connect to your SQL Server instance in your running Docker container.
The connection string would be:
"Server=localhost;Database=your database name;User Id=user id;Password=password"
You can leave out the Database setting if you just want to connect to the default database.
If you create any databases, you can then connect to them directly by specifying the name.
我也有这样的问题。我还尝试将OpenSSL降至 1.1.1k 和 1.1.1s ,但仍然行不通。最后,我发现了这种解释
因此,请继续使用OpenSSL 3.0.2,您只需要将
seclevel
更改为 0 而不是1
1 < /code>在/etc/ssl/openssl.conf
中,现在可以使用Ubuntu 22.04连接到SQL Server。
I also have same problem like this. I also tried downgrading Openssl to 1.1.1k and 1.1.1s but still not works. And finally I found this explanation
https://github.com/microsoft/msphpsql/issues/1419#issuecomment-1303626500
So, keep use OpenSSL 3.0.2 and you just need to change the
SECLEVEL
to0
instead of1
in/etc/ssl/openssl.conf
And it works, now I can connect to SQL Server using Ubuntu 22.04.
看这个
它对我有用!
请尝试一下
如果没有安装LiBSSL,
,尝试:更新:我使用Libssl1.1连接了问题,因此执行了前一步后,我切换到1.0,所以我也做了以下操作:
添加:
然后:然后:
然后:启动MySQL - 服务器和事情效果很好!
Looked at this
and it has worked for me!
So worth giving it a shot
If libssl is not installed, try:
Update: I had issues connecting using libssl1.1, so I switched to 1.0 after performing the previous steps, so I also did the following:
Added:
Then:
Then started mysql-server and things just worked fine!