title: Ubuntu 18.04 and msodbcsql17: Can't open lib - SHOULD I FILE A BUG REPORT?
body: <p>Folks, I have installed the msodbcsql package at least several dozen times.  Never had this issue come up.  Even spent the entire day yesterday trying to fix this.</p>
  
  <p>Step 1: add the apt key and repo to sourced.list.d
  Step 2: apt-get install the msodbcsql17, mssql-tools, php odbc_pdo extensions, etc
  Step 3: create a very basic test.php that (on all other existing older servers WORKS) makes a test connection to my mssql db.</p>
  
  <p>Fails with:</p>
  
  <pre><code>SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1' : file not found
  </code></pre>
  
  <p>Yes, the file exists.</p>
  
  <p>I have tried chmod 755 to the file, still says it does not exist.</p>
  
  <p>I have done a ldd against the file, here is the output:</p>
  
  <pre><code>    linux-vdso.so.1 (0x00007ffe13bf8000)
  libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc1e865a000)
  librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc1e8452000)
  libodbcinst.so.2 =&gt; /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fc1e823d000)
  libcrypto.so.1.0.2 =&gt; not found
  libkrb5.so.3 =&gt; /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fc1e7f67000)
  libgssapi_krb5.so.2 =&gt; /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fc1e7d1c000)
  libssl.so.1.0.2 =&gt; not found
  libuuid.so.1 =&gt; /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fc1e7b15000)
  libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc1e778c000)
  libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc1e73ee000)
  libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc1e71d6000)
  libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc1e6fb7000)
  libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc1e6bc6000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fc1e8c65000)
  libltdl.so.7 =&gt; /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fc1e69bc000)
  libk5crypto.so.3 =&gt; /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fc1e678a000)
  libcom_err.so.2 =&gt; /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fc1e6586000)
  libkrb5support.so.0 =&gt; /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fc1e637b000)
  libkeyutils.so.1 =&gt; /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fc1e6177000)
  libresolv.so.2 =&gt; /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc1e5f5c000)
  </code></pre>
  
  <p>Two libraries seem to be missing.  I found I have libssl1.1 and 1.0.0.  I have tried creating symlinks to BOTH the 1.1 and 1.0.0 versions of the libssl shared objects.  Still get the same error.</p>
  
  <p>Again, YES - I have copied/pasted the exact path the error screams about.  The path is correct.</p>
  
  <p>I have tried using isql command line as well - same exact error.  So this is certainly something with the odbc&lt;->msodbcsql library.  This is NOT specific to the PHP/PDO/ODBC stuff.</p>
  
  <p>Interestingly, the mssql-cli command line tool (from the Microsoft repo) DOES work.  Running ldd against it says it is NOT a dynamic executable.</p>
  
  <p>Installed versions of all libraries involved:</p>
  
  <pre><code>unixodbc = 2.3.7
  libodbc1 = 2.3.7
  odbcinst = 2.3.7
  msodbcsql = 17.3.1.1-1
  </code></pre>
  
  <p>All versions are the latest available from Microsoft repo.  All under Ubuntu 18.04.  I just re-tried the procedure (I have done countless times) on my laptop - same result.  Complaining that the driver library is not found.</p>
  
  <p>Output of odbcinst -j is as follows:</p>
  
  <pre><code>unixODBC 2.3.7
  DRIVERS............: /etc/odbcinst.ini
  SYSTEM DATA SOURCES: /etc/odbc.ini
  FILE DATA SOURCES..: /etc/ODBCDataSources
  USER DATA SOURCES..: /root/.odbc.ini
  SQLULEN Size.......: 8
  SQLLEN Size........: 8
  SQLSETPOSIROW Size.: 8
  </code></pre>
  
  <p>Yes, the files exist at /etc/odbcinst.ini and /etc/odb.ini.</p>
  
  <p>Contents of /etc/odbcinst.ini:</p>
  
  <pre><code>[ODBC Driver 17 for SQL Server]
  Description=Microsoft ODBC Driver 17 for SQL Server
  Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
  UsageCount=1
  </code></pre>
  
  <p>Running "stat /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1":</p>
  
  <pre><code>Size: 2046672       Blocks: 4000       IO Block: 4096   regular file
  </code></pre>
  
  <p>I have found very little info regarding this issue.  The few posts I have came across either did NOT solve the issue, or have NOT been answered.</p>
  
  <p>So.. am I missing something here?  Or should I file a bug report?</p>
  
  <p>On a side note, I have had nothing but issues with Ubuntu 18.04 and the msodbc stuff since day one.  Originally, there was the libcurl3/4 issue.  I suppose that has been fixed now.  But seems this may be... a bug?</p>