Skip to content

Instantly share code, notes, and snippets.

@jerm
Created November 21, 2015 04:10
Show Gist options
  • Save jerm/87717b0d483d15e9f428 to your computer and use it in GitHub Desktop.
Save jerm/87717b0d483d15e9f428 to your computer and use it in GitHub Desktop.
Patch for making msodbcsql-11.0.2270.0/install.sh work on ubuntu
--- install.sh 2013-01-15 15:11:53.000000000 -0500
+++ install-ubuntu.sh 2015-11-11 09:20:50.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Microsoft ODBC Driver 11 for SQL Server Installer
# Copyright Microsoft Corp.
@@ -17,7 +17,7 @@
req_proc="x86_64";
req_dm_ver="2.3.0";
dm_name="unixODBC $req_dm_ver";
-req_libs=( glibc e2fsprogs krb5-libs openssl )
+req_libs=( libc6 e2fsprogs libkrb5-3 openssl )
#language of the install
lang_id="en_US";
@@ -69,7 +69,6 @@
fi
if [ ${#bin_files[@]} -ne ${#bin_perms[@]} ]; then
echo "Bin files and permission sets don't match"
- exit 1;
fi
if [ ${#sup_files[@]} -ne ${#sup_perms[@]} ]; then
echo "Supplemental files and permission sets don't match"
@@ -230,7 +229,8 @@
for lib in ${req_libs[@]}
do
- local present=$(rpm -q -a $lib) >> $log_file 2>&1
+ local present=$(dpkg -l | grep $lib) >> $log_file 2>&1
+ #local present=$(rpm -q -a $lib) >> $log_file 2>&1
if [ "$present" == "" ]; then
log "The $lib library was not found installed in the RPM database."
log "See README for which libraries are required for the $driver_name."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment