M BUZZ CRAZE NEWS
// news

MSSQL on Ubuntu, can't get it to install?

By Emma Martinez

Recently MS launched mssql-server for Linux. I'd like to use it but I can't manange to run

sudo apt-get install -y mssql-server

It says

E: Unable to locate package mssql-server

Current Ubuntu is 16.04.1 LTS.

I tried to follow [these instructions on Microsoft's website]( ) and don't know what else to do with it.

6

2 Answers

You will need a 64-bit system for this to work ;)

First, add the Xenial MSSQL repository to your system:

$ sudo curl -o /etc/apt/sources.list.d/mssql-server.list % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 91 100 91 0 0 195 0 --:--:-- --:--:-- --:--:-- 195
$ curl | sudo apt-key add - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 983 100 983 0 0 2337 0 --:--:-- --:--:-- --:--:-- 2340
OK

Second, update APT's list of available packages:

$ sudo apt-get update
Hit:1 yakkety InRelease
Get:2 yakkety-security InRelease [93,3 kB]
Hit:3 yakkety InRelease
Hit:4 yakkety-updates InRelease
Hit:5 yakkety-backports InRelease
Get:6 xenial InRelease [2828 B]
Get:7 xenial/main amd64 Packages [940 B]
Fetched 97,1 kB in 0s (204 kB/s)
Reading package lists... Done

Optionally, you can check that it's ready to install:

$ apt-cache search mssql-server
mssql-server - Microsoft SQL Server Relational Database Engine
mssql-server-agent - Microsoft SQL Server Agent
mssql-server-fts - Microsoft SQL Server Full Text Search.
mssql-server-ha - The mssql-server-ha package contains HA extensions for the Microsoft SQL Server Relational Database Engine.
mssql-server-is - SSIS on Linux

Then, just install with sudo apt install mssql-server.

4

I seached and finally found a working solution:

Installation

The first thing to do is import the necessary repository key. From the terminal window, issue the following command:

sudo wget -qO- | sudo apt-key add -

Next, add the repository with the command:

sudo add-apt-repository "$(wget -qO- )"

Update the APT database with the command:

sudo apt-get update

And, finally, install MS SQL with the command:

sudo apt-get install mssql-server -y
2