microsoft / linux-package-repositories

Microsoft Packaged Linux Software (DEBs, RPMs, etc) are hosted on packages.microsoft.com (PMC) made available as native Linux repositories for use with package managers like APT, YUM, etc.
https://packages.microsoft.com
MIT License
71 stars 17 forks source link

Cannot install mssql-tools-18 on Ubuntu - Certificate not trusted (22.04) or not signed (24.04) #183

Closed JMeisnerEpicor closed 2 weeks ago

JMeisnerEpicor commented 3 weeks ago

Describe the issue Cannot install mssql-tools-18 on Ubuntu 24.04

When did the issue occur? Nov. 7th 2024

If applicable, what package did you attempt to install, and from which repo? mssql-tools18

Steps to Reproduce Ubuntu directions from microsoft: https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver16&tabs=ubuntu-install

Actual Result

sudo curl https://packages.microsoft.com/config/ubuntu/24.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list

Get:1 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B] Err:1 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease Reading package lists... Done W: GPG error: https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF E: The repository 'https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

sudo apt-get update Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease Hit:5 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease Reading package lists... Done

However it wont install mssql-tools18

$ sudo apt-get install mssql-tools18 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libltdl7 libodbc2 libodbcinst2 msodbcsql18 odbcinst unixodbc unixodbc-common Suggested packages: odbc-postgresql tdsodbc The following NEW packages will be installed: libltdl7 libodbc2 libodbcinst2 msodbcsql18 mssql-tools18 odbcinst unixodbc unixodbc-common 0 upgraded, 8 newly installed, 0 to remove and 8 not upgraded. Need to get 1242 kB of archives. After this operation, 1151 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 libltdl7 amd64 2.4.7-7build1 [40.3 kB] Get:2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libodbc2 amd64 2.3.12-1ubuntu0.24.04.1 [158 kB] Get:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 unixodbc-common all 2.3.12-1ubuntu0.24.04.1 [8806 B] Get:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libodbcinst2 amd64 2.3.12-1ubuntu0.24.04.1 [30.7 kB] Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 odbcinst amd64 2.3.12-1ubuntu0.24.04.1 [9672 B] Get:6 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 unixodbc amd64 2.3.12-1ubuntu0.24.04.1 [27.5 kB] Get:7 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 msodbcsql18 amd64 18.4.1.1-1 [755 kB] Ign:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 mssql-tools18 amd64 18.4.1.1-1 Ign:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 mssql-tools18 amd64 18.4.1.1-1 Ign:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 mssql-tools18 amd64 18.4.1.1-1 Err:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 mssql-tools18 amd64 18.4.1.1-1 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 20.242.16.222 443] Fetched 1030 kB in 9s (112 kB/s) E: Failed to fetch https://pmc-geofence.trafficmanager.net/ubuntu/22.04/prod/pool/main/m/mssql-tools18/mssql-tools18_18.4.1.1-1_amd64.deb?geofence=true Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 20.242.16.222 443] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Expected Result It should install with a valid certificate regardless of the version used

Additional context fresh install of Ubuntu from windows store using WSL

mbearup commented 3 weeks ago

@JMeisnerEpicor Thanks for reporting these issues.

JMeisnerEpicor commented 2 weeks ago

Excellent, thank you!