ubuntu 16-04上的mssql

时间:2018-06-01 12:18:53

标签: sql-server linux ubuntu ubuntu-16.04

帮我安装MSSQL

错误代码

root@redie:~# apt-get install mssql-server mssql-tools -y
E: Malformed line 1 in source list /etc/apt/sources.list.d/mssql.list (type)
E: The list of sources could not be read.
E: Malformed line 1 in source list /etc/apt/sources.list.d/mssql.list (type)
E: The list of sources could not be read.

1 个答案:

答案 0 :(得分:0)

根据this instruction你应该

  1. 首先,在软件包源列表中添加Microsoft SQL Server Ubuntu存储库

    wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
    
  2. 然后更新来源列表

    sudo apt-get update
    
  3. 现在,您可以安装mssql-server

    sudo apt-get install -y mssql-server