How to install mssql-cli at UBUNTU 18 LTS?
I am using apt install mssql-cli
in a fresh UBUNTU 18 LTS, and, even after used this answer (mssql-server
installed with successes) and this other one (executed all commands), there are "unmet dependencies",
apt install mssql-cli
:
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-cli : Depends: libicu52 but it is not installable or
libicu55 but it is not installable or
libicu57 but it is not installable
E: Unable to correct problems, you have held broken packages.
note
A similar problem when apt install powershell
:
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:
powershell : Depends: libcurl3 but it is not going to be installed
Depends: libicu55 but it is not installable
E: Unable to correct problems, you have held broken packages.
dumps
/etc/apt/sources.list.d/microsoft.list
:
deb [arch=amd64] https://packages.microsoft.com/ubuntu/17.10/prod artful main
/etc/apt/sources.list
:
deb http://mirrors.digitalocean.com/ubuntu/ bionic main restricted
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic main restricted
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates main restricted
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates main restricted
deb http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates multiverse
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates multiverse
Solution 1:
mssql-server-2017 is not supported on 18.04 yet. You should wait for Microsoft to support it and then change your apt source file accordingly. The instruction you should find here, once it is ready:
https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017#install
Currently this only covers the installation for 16.04, and a corresponding APT repository for 18.04 does not exist yet.
As an alternative to waiting you can install Ubuntu 16.04 and use Microsofts instructions linked above to install mssql-server. 16.04 is still a supported and widely used Ubuntu version.
Solution 2:
Looks like we are missing the libicu60 alternative dependency. PR is out here: https://github.com/dbcli/mssql-cli/pull/205.
This fix has been merged and released.
Please rerun
apt install mssql-cli
it should resolve the additional alternative dependency for libicu60.