{"id":1471,"date":"2017-11-06T04:22:23","date_gmt":"2017-11-06T04:22:23","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1471"},"modified":"2017-11-07T01:01:21","modified_gmt":"2017-11-07T01:01:21","slug":"e-unable-to-locate-package-mssql-server-ubuntu-sql-server-installation-error","status":"publish","type":"post","link":"http:\/\/www.theSQLReport.com\/?p=1471","title":{"rendered":"E: Unable to locate package mssql-server &#8211; Ubuntu SQL Server Installation Error"},"content":{"rendered":"<p><strong>Problem:<\/strong><\/p>\n<p>With the new install of Ubuntu 16.04.3 LTS (GNU\/Linux 4.4.0-87-generic x86_64), different attempts at installing SQL Server resulted in the error: &#8220;E: Unable to locate package mssql-server&#8221;.<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Install_Error.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1473 size-full aligncenter\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Install_Error.jpg\" alt=\"SQL Linux Install Error\" width=\"550\" height=\"150\" \/><\/a><\/p>\n<p><strong>Resolution:<\/strong><\/p>\n<p>On a new installation of the Ubuntu 16.04 operating system, I had to run the following four step in order to ensure that my SQL Server would install.<\/p>\n<ul>\n<li>Installation of cURL\n<ul>\n<li>cURL is the command line tool and library that is used for transferring data with URL syntax<\/li>\n<li>will be prompted for the Linux user account password due to the &#8220;sudo&#8221; command being run<\/li>\n<li>will be asked to respond yes to the 323 KB of space need to install the package<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>sudo apt install curl<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1478 size-full aligncenter\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl.jpg\" alt=\"LINUX install cURL\" width=\"874\" height=\"622\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl.jpg 874w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl-300x214.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl-768x547.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_LINUX_install_curl-210x149.jpg 210w\" sizes=\"(max-width: 874px) 100vw, 874px\" \/><\/a><\/p>\n<ul>\n<li>Import the public repository GPG keys used by apt to authenticate packages from Microsoft.<\/li>\n<\/ul>\n<pre>curl https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo apt-key add -\r\n<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1477 size-full aligncenter\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add.jpg\" alt=\"Linux Apt Key Add\" width=\"966\" height=\"190\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add.jpg 966w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add-300x59.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add-768x151.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_Key_Add-210x41.jpg 210w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n<ul>\n<li>Add Microsoft to the apt repository\n<ul>\n<li>Will be prompted for the Linux user account password due to the &#8220;sudo&#8221; command being run<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>curl https:\/\/packages.microsoft.com\/config\/ubuntu\/16.04\/mssql-server.list | sudo tee \/etc\/apt\/sources.list.d\/mssql-server.list\r\n<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1474 size-full aligncenter\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list.jpg\" alt=\"Linux mssql-server.list\" width=\"935\" height=\"207\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list.jpg 935w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list-300x66.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list-768x170.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_mssql-server_list-210x46.jpg 210w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/a><\/p>\n<ul>\n<li>Most important &#8211; this command downloads the package lists from the repositories and &#8220;updates&#8221; them to get information on the newest versions of packages and their dependencies.\n<ul>\n<li><span style=\"text-decoration: underline;\"><strong>The update command needs to be run after the two cURL commands, otherwise the SQL Server installation will end with an error.<\/strong><\/span><\/li>\n<li>This is where I had trouble, because I thought I had run this command a number of times already, and did not need to run again.\u00a0 However it is critical this command runs after the two cURL commands.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>sudo apt-get update\r\n<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1476 size-full aligncenter\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update.jpg\" alt=\"Linux Apt get update\" width=\"935\" height=\"262\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update.jpg 935w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update-300x84.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update-768x215.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_Apt_get_update-210x59.jpg 210w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/a><\/p>\n<ul>\n<li>After these four steps have been completed, SQL Server should install.<\/li>\n<\/ul>\n<pre>sudo apt-get install -y mssql-server<\/pre>\n<div id=\"attachment_1475\" style=\"width: 946px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1475\" class=\"wp-image-1475 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install.jpg\" alt=\"Linux SQL Server Installation\" width=\"936\" height=\"313\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install.jpg 936w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install-300x100.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install-768x257.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/11\/SQL_Linux_SQL_Server_Install-210x70.jpg 210w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><p id=\"caption-attachment-1475\" class=\"wp-caption-text\">Only the top couple of lines for the install of SQL Server for Linux are shown. There are a couple of pages of text with the actual installation.<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: With the new install of Ubuntu 16.04.3 LTS (GNU\/Linux 4.4.0-87-generic x86_64), different attempts at installing SQL Server resulted in the error: &#8220;E: Unable to locate package mssql-server&#8221;. Resolution: On &hellip; <a class=\"readmore\" href=\"http:\/\/www.theSQLReport.com\/?p=1471\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1473,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4],"tags":[110,111,112,109],"class_list":["post-1471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-sql-server","tag-apt-get","tag-installation","tag-mssql-server","tag-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1471"}],"collection":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1471"}],"version-history":[{"count":17,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1471\/revisions"}],"predecessor-version":[{"id":1491,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1471\/revisions\/1491"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1473"}],"wp:attachment":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1471"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}