Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odbcinst: SQLInstallDriverEx failed with Invalid install path. #1

Closed
scbrady opened this issue Jul 31, 2017 · 28 comments
Closed

odbcinst: SQLInstallDriverEx failed with Invalid install path. #1

scbrady opened this issue Jul 31, 2017 · 28 comments

Comments

@scbrady
Copy link

scbrady commented Jul 31, 2017

When trying to install the PHP SQLSRV drivers on OS X Sierra, I get the error odbcinst: SQLInstallDriverEx failed with Invalid install path.

I'm following the steps here: https://github.com/Microsoft/msphpsql/tree/master#install-unix
All the steps work until I get to these:

brew tap microsoft/msodbcsql https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install msodbcsql

This is the output of homebrew:

==> Installing msodbcsql from microsoft/mssql-release
==> Using the sandbox
==> Downloading http://download.microsoft.com/download/4/9/5/495639C0-79E4-45A7-B65A-B264
Already downloaded: /Users/scott/Library/Caches/Homebrew/msodbcsql-13.1.9.0.tar.gz
The license terms for this product can be downloaded from
https://aka.ms/odbc131eula and found in
/usr/local/share/doc/msodbcsql/LICENSE.txt . By entering 'YES',
you indicate that you accept the license terms.

Do you accept the license terms? (Enter YES or NO)
YES
==> odbcinst -u -d -n "ODBC Driver 13 for SQL Server"
==> odbcinst -i -d -f ./odbcinst.ini
Last 15 lines from /Users/scott/Library/Logs/Homebrew/msodbcsql/02.odbcinst.ini:
2017-07-31 18:41:58 -0400

odbcinst -i -d -f ./odbcinst.ini

odbcinst: SQLInstallDriverEx failed with Invalid install path.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/microsoft/homebrew-mssql-release/issues

Are there any steps to take besides what is listed on the webpage I linked?

@pshah222
Copy link

pshah222 commented Aug 1, 2017

I am having similar issues as well. I am following the direction from:
https://www.microsoft.com/en-us/sql-server/developer-get-started/node/mac/

@meet-bhagdev
Copy link
Contributor

@mateusz-kmiecik can you take a look?

@meet-bhagdev meet-bhagdev assigned meet-bhagdev and ghost and unassigned meet-bhagdev Aug 1, 2017
@limbera
Copy link

limbera commented Aug 1, 2017

I'm experiencing the same issue on OSX 10.12.4

@joshlebeau
Copy link

Also experiencing the same issue on OSX 10.12.6

@batto77
Copy link

batto77 commented Aug 1, 2017

The same issue on OSX 10.12.5

@varadh10
Copy link

varadh10 commented Aug 1, 2017

same here. OSX 10.12.6

$ brew install mssql-tools
==> Installing mssql-tools from microsoft/mssql-release
==> Installing dependencies for microsoft/mssql-release/mssql-tools: msodbcsql
==> Installing microsoft/mssql-release/mssql-tools dependency: msodbcsql
==> Using the sandbox
==> Downloading http://download.microsoft.com/download/4/9/5/495639C0-79E4-45A7-B65A-B264071C3D9A/msodbcsql-13.1.9.0.tar.gz
Already downloaded: /Users/foo/Library/Caches/Homebrew/msodbcsql-13.1.9.0.tar.gz
The license terms for this product can be downloaded from
https://aka.ms/odbc131eula and found in
/usr/local/share/doc/msodbcsql/LICENSE.txt . By entering 'YES',
you indicate that you accept the license terms.

Do you accept the license terms? (Enter YES or NO)
YES
==> odbcinst -u -d -n "ODBC Driver 13 for SQL Server"
==> odbcinst -i -d -f ./odbcinst.ini
Last 15 lines from /Users/foo/Library/Logs/Homebrew/msodbcsql/02.odbcinst.ini:
2017-08-01 12:01:10 -0700

odbcinst -i -d -f ./odbcinst.ini

odbcinst: SQLInstallDriverEx failed with Invalid install path. 
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/microsoft/homebrew-mssql-release/issues

@meet-bhagdev
Copy link
Contributor

@ALL we are actively looking into this. I will have an update ASAP

@RodrigoCR
Copy link

Same issue on OSX 10.12.6

ca-rodrigo:~ rodrigocr$ brew doctor
Your system is ready to brew.
ca-rodrigo:~ rodrigocr$ brew config
HOMEBREW_VERSION: 1.3.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 05e9086355607e9103030b1f0e3f186e674ce063
Last commit: 31 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 104587b311714be006d2cc0323fa0addc8f17634
Core tap last commit: 5 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit dunno
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.11.0 => /Library/Developer/CommandLineTools/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12.6-x86_64
Xcode: N/A
CLT: 8.3.2.0.1.1492020469
X11: N/A

@meet-bhagdev keep us updated please

@meet-bhagdev
Copy link
Contributor

meet-bhagdev commented Aug 1, 2017

@ALL, is this a recent issue or have you always run into this?

@RodrigoCR
Copy link

@meet-bhagdev I don't know, for me, it is, cause I just started working with this driver since yesterday. I didn't find any info about the error, that's why I was about to start the issue, but now I know I'm not the only one.

@v-chojas
Copy link
Contributor

v-chojas commented Aug 1, 2017

@ALL,

Edit: SEE THIS COMMENT FOR CORRECT INSTRUCTIONS: #1 (comment) also available at The official Documentation

The original comment text below is preserved for historical purposes only.

This issue appears to be caused by some changes in homebrew; while we investigate, there is a workaround you may use to install the driver, using this command:

brew install --without-registration msodbcsql

After it completes, run odbcinst -j and note the DRIVERS path; e.g. it could be /usr/local/Cellar/unixodbc/2.3.4/etc/odbcinst.ini . Open that file in a text editor and add a section:

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.13.dylib
UsageCount=1

save and close the file, and you should then be able to use the driver.

@tabascoterrier
Copy link

@v-chojas Many thanks for the workaround, that works for me.

@scbrady
Copy link
Author

scbrady commented Aug 2, 2017

@v-chojas Thanks for that! Worked for me too.

@joshlebeau
Copy link

This worked for me:

brew install --without-registration microsoft/msodbcsql/msodbcsql

@v-chojas
Copy link
Contributor

v-chojas commented Aug 2, 2017

I have determined that the install failure is due to another "security feature" recently introduced into Homebrew --- as of 1.3.0 --- which runs all installers in a restricted sandbox environment: Homebrew/brew#2898

However, you can still disable that with an option, and it will register the driver in odbcinst.ini correctly without having to perform the manual workaround above:

brew install --no-sandbox msodbcsql

@sixfeetover
Copy link

@v-chojas That worked for me, thanks.

@lacivert
Copy link

I had the same issue and @v-chojas ' first solution looks well for me

@cjorge
Copy link

cjorge commented Aug 18, 2017

Going completely nuts here... I'm always getting this error message:

SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libodbcinst.2.dylib' : file not found

The file exists and @v-chojas driver info is present. Any idea of what may be causing this error?

@cjorge
Copy link

cjorge commented Aug 18, 2017

In the message should be "/usr/local/lib/libmsodbcsql.13.dylib"

@meet-bhagdev
Copy link
Contributor

@cjorge we are looking into this!

@cjorge
Copy link

cjorge commented Aug 24, 2017

Just FYI, I installed the 7.1 on another computer without any problem... I'm thinking about trying to upgrade my 7.0 to 7.1 and give it another try.

The only difference I see is that my user (on the mac with the problem) has root access...

@v-chojas
Copy link
Contributor

I have tried on a clean macOS Sierra machine and the installation instructions at https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server work to install the driver, and I could verify its basic functionality (i.e. could connect to SQL Server) using isql -v -k <my connection string here>.

chapskev added a commit to chapskev/msphpsql that referenced this issue Sep 13, 2017
I have determined that the install failure is due to another "security feature" recently introduced into Homebrew --- as of 1.3.0 --- which runs all installers in a restricted sandbox environment: Homebrew/brew#2898

However, you can still disable that with an option, and it will register the driver in odbcinst.ini correctly without having to perform the manual workaround above:

microsoft/homebrew-mssql-release#1 (comment)
@kenorb
Copy link

kenorb commented Oct 24, 2017

Related: /issues/3

@David-Engel
Copy link
Contributor

This appears to have been fixed. Closing. Feel free to reopen if the issue persists.

@dlindelof
Copy link

I'm experiencing this problem again:

GENC02YC0KKJGH7:vip dlindelof$ brew install msodbcsql
Updating Homebrew...
==> Installing msodbcsql from microsoft/mssql-release
==> Downloading https://download.microsoft.com/download/4/9/5/495639C0-79E4-45A7-B65A-B264071C3D9A/msodbcsql-13.1.9.2.tar.gz
Already downloaded: /Users/dlindelof/Library/Caches/Homebrew/downloads/8f7c6834a87f6929b76418db93542d73395a5e5b9099c57d13a49e5991a8edab--msodbcsql-13.1.9.2.tar.gz
The license terms for this product can be downloaded from
https://aka.ms/odbc131eula and found in
/usr/local/share/doc/msodbcsql/LICENSE.txt . By entering 'YES',
you indicate that you accept the license terms.

Do you accept the license terms? (Enter YES or NO)
YES
==> odbcinst -u -d -n "ODBC Driver 13 for SQL Server"
==> odbcinst -i -d -f ./odbcinst.ini
Last 15 lines from /Users/dlindelof/Library/Logs/Homebrew/msodbcsql/02.odbcinst:
2019-05-07 09:04:44 +0200

odbcinst
-i
-d
-f
./odbcinst.ini

odbcinst: SQLInstallDriverEx failed with Invalid install path.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/microsoft/homebrew-mssql-release/issues

I've tried the --no-sandox option, but it doesn't seem to be accepted by Homebrew anymore.

@v-chojas
Copy link
Contributor

v-chojas commented May 8, 2019

Have you tried to install msodbcsql17, and if so, does the problem persist there? That is the latest version of the driver.

@anreciomar
Copy link

See #40

Solutions been done here!

@haidar3tech
Copy link

Thanks v-chojas, it worked for me.

I followed your stepes for msodbcsql17

brew install --without-registration msodbcsql17

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.17.dylib
UsageCount=1

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests