<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Debian 9 &#8211; Diary of an Emacs tragic</title>
	<atom:link href="https://emacstragic.net/category/debian-9/feed/" rel="self" type="application/rss+xml" />
	<link>https://emacstragic.net</link>
	<description>Jason Lewis</description>
	<lastBuildDate>Tue, 23 Nov 2021 02:39:37 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://emacstragic.net/wp-content/uploads/2018/12/cropped-jason-lewis-profile-picture-square-150x150.jpg</url>
	<title>Debian 9 &#8211; Diary of an Emacs tragic</title>
	<link>https://emacstragic.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">38469313</site>	<item>
		<title>MSSQL ODBC Client on Debian 9 Stretch</title>
		<link>https://emacstragic.net/debian-2/mssql-odbc-client-on-debian-9-stretch/</link>
					<comments>https://emacstragic.net/debian-2/mssql-odbc-client-on-debian-9-stretch/#comments</comments>
		
		<dc:creator><![CDATA[Jason]]></dc:creator>
		<pubDate>Mon, 06 Nov 2017 02:43:11 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debian 9]]></category>
		<category><![CDATA[Debian Stretch]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://emacstragic.net/?p=1437</guid>

					<description><![CDATA[Many years ago fREW Schmidt wrote a very handy article on installing MSSQL ODBC drivers in debian. Since then Microsoft have improved their support of debian somewhat and things have changed making it easier to install, however they still (as at 2017-11-06) have not released proper drivers for Debian Stretch.Add the microsoft repo Add the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Many years ago <a href="https://blog.afoolishmanifesto.com/">fREW</a> Schmidt wrote a <a href="https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/">very handy article</a> on installing MSSQL ODBC drivers in debian. Since then Microsoft have improved their support of debian somewhat and things have changed making it easier to install, however they still (as at 2017-11-06) have not released proper drivers for Debian Stretch.<br>Add the microsoft repo</p>


<pre class="wp-block-code"><code lang="bash" class="language-bash">echo 'deb [arch=amd64] https://packages.microsoft.com/debian/8/prod jessie main' &gt; /etc/apt/sources.list.d/mssql-release.list</code></pre>



<p>Add the key</p>



<pre class="wp-block-preformatted">curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
</pre>



<p>then update and install</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt install msodbcsql mssql-tools
</pre>



<p>If you try and connect to sql now you get an obscure error like this:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">/opt/mssql-tools/bin/sqlcmd -S 10.0.2.13 -U xxx -P yyy
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Can't open lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.1' : file not found.
</code></pre>



<p>But the file exists:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">$ file /opt/mssql-tools/bin/sqlcmd
/opt/mssql-tools/bin/sqlcmd: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=21a353af470e7849544daab892ec9b1bfc36dc87, not stripped</code></pre>



<p>This somewhat misleading error is actually due to the <code>libmsodbcsql</code> lib being linked against a very specific version of libssl. Check the output of ldd:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">$ ldd /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.1 | grep 'not found'
libcrypto.so.1.0.0 => not found
libssl.so.1.0.0 => not found</code></pre>



<p>But it turns out this can easily be solved by manually installing the libssl package from Debian Jessie:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">wget "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb"
sudo apt install ./libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb</code></pre>



<p>then you should be back in business.</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://emacstragic.net/debian-2/mssql-odbc-client-on-debian-9-stretch/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1437</post-id>	</item>
	</channel>
</rss>
