Comments (49)
@nico525 @fonnesbeck M1 ARM support is being worked on. Barring any blocking issues, it is planned be in our next regular release at the end of July.
from homebrew-mssql-release.
@wizardion - I'm filling in for David at the moment and can say that the end-of-July release is on track to include M1 ARM support.
from homebrew-mssql-release.
Hi @vwarchu - any update on the release for M1 ARM support?
from homebrew-mssql-release.
just wanted to circle back to say thanks and that worked.
In case it's ever helpful to anyone else the steps are below.
- Uninstall msodbc 17: brew remove msodbcsql17 mssql-tools
- Remove any symlinks to odbcinst.ini and odbc.ini
- Remove pyodbc, if applicable (pip uninstall pyodbc)
- Install a separate instance of homebrew as outlined below:
https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343 - in a terminal running Rosetta (as described in step 4) do the following steps below.
- install the msodbc 17 driver per the directions below:
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver15 - customize odbc.ini (if applicable)
- ensure odbcinst.ini path (odbcinst -j)
from homebrew-mssql-release.
@David-Engel is there any news about the new version of this driver for M1 ARM? July is coming soon...
from homebrew-mssql-release.
Thanks a lot @JayBaywatch!
I have written up some instructions to get pyodbc to work on the M1 as well:
One can only use pyodbc
when using Rosetta (x86 emulation).
Follow the steps below.
Uninstall M1 versions of brew packages (if installed at all):
brew uninstall unixodbc msodbcsql17 mssql-tools freetds
Install x86 Homebrew alongside the ARM M1 homebrew:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then use x86 homebrew like arch -x86_64 /usr/local/bin/brew install
or use the following alias (add to ~/.bash_profile
)
# Relies on having installed x86 brew like:
# arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
alias x86brew="arch -x86_64 /usr/local/bin/brew"
alias brew="/opt/homebrew/bin/brew" # M1 version, to avoid from using x86 version accidentally
Install the ODBC packages.
x86brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
x86brew update
HOMEBREW_ACCEPT_EULA=Y x86brew install msodbcsql17 mssql-tools
Create an x86 conda
env with:
ENV_NAME="rosetta"
CONDA_SUBDIR=osx-64 conda create -n $ENV_NAME python
conda activate $ENV_NAME
conda config --env --set subdir osx-64
or if using micromamba
:
ENV_NAME="rosetta"
CONDA_SUBDIR=osx-64 micromamba create -n $ENV_NAME python
micromamba activate $ENV_NAME
from homebrew-mssql-release.
Mine did work with Rosetta2,
Kill the native brew version, duplicate your terminal all and check the Rosetta2 box and reinstall brew/MSSQL
Until there's a arm64 version that's what I'll be doing.
from homebrew-mssql-release.
@victoriawallace End of July == the last day of the month. If you want to get notifications of driver releases, you can subscribe to our blog at https://techcommunity.microsoft.com/t5/sql-server/bg-p/SQLServer/label-name/SQLServerDrivers
from homebrew-mssql-release.
Everything works! Thank you!
from homebrew-mssql-release.
@RomkaSk Thanks for the heads up about the release notes. I just edited those and the mac install page to note the added M1 support. It should be reflected after tomorrow morning. Glad it's working for you!
from homebrew-mssql-release.
Thanks, I had tried otool and everything seemed fine.
otool -L /opt/homebrew/lib/libmsodbcsql.17.dylib
/opt/homebrew/lib/libmsodbcsql.17.dylib:
/opt/homebrew/opt/msodbcsql17/lib/libmsodbcsql.17.dylib (compatibility version 0.0.1, current version 8.1.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
/opt/homebrew/lib/libodbcinst.2.dylib (compatibility version 3.0.0, current version 3.0.0)
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
sqlcmd and isql both work, so I guess I have to assume that this is a pyodbc issue at this point.
edit: unsure if those compatibility versions are normal or not.
from homebrew-mssql-release.
No support for ARM64 at the moment.
from homebrew-mssql-release.
That's what I figured, but it didn't get me an arch error so I thought it was something I could fix.
Would this work under Rosetta2?
from homebrew-mssql-release.
If your application and its dependencies are also consistently x86_64, I don't see why not.
from homebrew-mssql-release.
Running into the same issue report by @MrRobot245 and have been unable to resolve. Happy to provide more information if needed, understand support is only for x86_64 but would be good to know if there is a workaround to make use of Rosetta2
from homebrew-mssql-release.
Thanks @MrRobot245, those instructions worked for me, appreciate the help.
from homebrew-mssql-release.
Is there any timeline on arm? I do not want to remove and reinstall my full software stack just because of this ODBC driver
FreeTDS works so far, but I am deploying to a Unix environment and would like to develop more closely to that environment
from homebrew-mssql-release.
Is there any hope for a M1-compatible update, or is this not happening?
from homebrew-mssql-release.
Thanks for the update.
from homebrew-mssql-release.
Hi @David-Engel
I've tried reinstalling the ODBC Driver 17 for macOS following the release on Saturday -
$ odbcinst -j
unixODBC 2.3.9
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /Users/vikki.wallace/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
$ cat /etc/odbcinst.ini
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.13.dylib
UsageCount=2
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/homebrew/lib/libmsodbcsql.17.dylib
UsageCount=5
$ ls -la /opt/homebrew/lib/libmsodbcsql.17.dylib
lrwxr-xr-x 1 vikki.wallace admin 56 31 Jul 16:54 /opt/homebrew/lib/libmsodbcsql.17.dylib -> ../Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib
but I still can't connect -
>>> pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE=qai;UID='+username+';PWD='+password)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")
>>> pyodbc.connect('DRIVER={/opt/homebrew/Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib};SERVER='+server+';DATABASE=qai;UID='+username+';PWD='+password)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")
Can you please advise?
Thanks
from homebrew-mssql-release.
Try to use connection string like this
driver = 'ODBC Driver 17 for SQL Server'
SQLALCHEMY_CONNECTION_STRING = 'mssql+pyodbc://{2}:{3}@{0}/{1}?driver={4}&Port=1433'.format(
DB_SERVER, DB_NAME, DB_USER, DB_PASSWORD, driver)
and after put it in sqlalchemy.engine.create_engine()
from homebrew-mssql-release.
Still doesn't work for me on Air M1. With driver = 'ODBC Driver 17 for SQL Server'
, I'm still getting
Can't open lib '/usr/local/lib/libmsodbcsql.17.dylib' : file not found
any help?
from homebrew-mssql-release.
/usr/local/lib
is where the x86 one should be. Did you install from a native ARM64 brew or one running under Rosetta2 emulation?
from homebrew-mssql-release.
I installed it from the native ARM64 brew. When installed from brew under Rosetta2, the path is ../Cellar/msodbcsql17/17.8.1.1lib/libmsodbcsql.17.dylib
, and it works fine in that case. But the point is that I want to remove brew under Rosetta2 and keep just the native one
from homebrew-mssql-release.
Please try to remove it from the Rosetta2 brew, then install from the native one.
Also make sure you are using native isql
when testing connection, i.e. when running which isql
result should be in /opt/homebrew/
instead of /usr/local
.
from homebrew-mssql-release.
@RomkaSk I'm using the driver as you said 'driver = 'ODBC Driver 17 for SQL Server' ' but I'm still getting the error below
Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' : file not found
Any help ?
from homebrew-mssql-release.
Are you using native arm64 isql?
from homebrew-mssql-release.
@v-chojas I think yes, how can I check this ?
PS : When I type isql --version I get : unixODBC 2.3.9
from homebrew-mssql-release.
I am having similar problems with the arm64 release.
I was getiting:
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")
Then I noticed that /opt/homebrew/lib/libmsodbcsql.17.dylib is linked to /opt/homebrew/Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib
so I updated odbcinst.ini
[ODBC Driver 17 for SQL Server] Description=Microsoft ODBC Driver 17 for SQL Server #Driver=/opt/homebrew/lib/libmsodbcsql.17.dylib Driver=/opt/homebrew/Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib UsageCount=1
But that didn't help.
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/Cellar/msodbcsql17/17.8.1.1/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")
Has anyone actually gotten this to work on Apple arm64 silicon? I tried on 2 separate machines with the same result.
from homebrew-mssql-release.
I've installed homebrew from scratch and then ODBC driver and mssql-tools
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
- brew update
- HOMEBREW_NO_ENV_FILTERING=1 ACCEPT_EULA=Y brew install msodbcsql17 mssql-tools
I have no problem running a simple SELECT @@version
using isql
from homebrew-mssql-release.
something in our environments are different.
Are those the defaults for you? My defaults are in /etc/ while yous appear to be in /opt/homebrew/etc/
unixODBC 2.3.9
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /Users/baywatch/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
I do have /opt/homebrew/lib/libmsodbcsql.17.dylib but I get errors that
('01000', "[01000] [unixODBC][Driver Manager]Can't open lib /opt/homebrew/lib/libmsodbcsql.17.dylib : file not found (0) (SQLDriverConnect)")
fresh install, and just got the same behavior.
from homebrew-mssql-release.
Did you install unixodbc using homebrew, @JayBaywatch ?
My env was basically clean... it was only used for testing installation. Please make sure your homebrew was installed in the native mode not Rosetta2
from homebrew-mssql-release.
the first atempt, I installed unixodbc and freetds from homebrew. subsequent attempts, I let homebrew pull the dependencies from the msodbc recipe.
from homebrew-mssql-release.
/usr/bin/arch reports arm64
from homebrew-mssql-release.
Please remove and try again the installation.
from homebrew-mssql-release.
hm, that works for isql now. but still no dice from python. Although I am no longer getting a complaint about/opt/homebrew/lib/libmsodbcsql.17.dylib not being found.
This is progress, thank you.
from homebrew-mssql-release.
Great, @JayBaywatch !
For the others, to quickly check if isql
is native, run file /opt/homebrew/bin/isql
The expected output is /opt/homebrew/bin/isql: Mach-O 64-bit executable arm64
from homebrew-mssql-release.
even using a minimalist sample from python I get errors.
server = 'DB-DEV01'
username = 'user'
password = 'p@assword'
pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE=Master;UID='+username+';PWD='+password)
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")
isql still works though. weird.
from homebrew-mssql-release.
Does otool -L '/opt/homebrew/lib/libmsodbcsql.17.dylib'
show any "file not found" errors?
You can also use dtruss
to determine which file exactly it is not found.
from homebrew-mssql-release.
You are using ARM64 Python and pyODBC? https://github.com/mkleehammer/pyodbc/issues <- you can ask there
from homebrew-mssql-release.
hey, thanks for that. There is a suggestion over there to build from source. I can try that.
from homebrew-mssql-release.
hey, thanks for that. There is a suggestion over there to build from source. I can try that.
For me, it didn't work when running Python via Rosseta emulation although I had drivers properly installed. Switching to python 3.9.5 which runs nativly on ARM solved the issue.
So, you need to run both python and msssql drivers nativly in order to make it work.
from homebrew-mssql-release.
If everything is consistently running in emulation (from application to driver) that should work too, and would be your only choice if you have an x86 app that you need to use with the ODBC driver.
However, everything running natively in ARM mode should also work. The key point to remember is to not mix the two architectures' binaries together.
from homebrew-mssql-release.
from homebrew-mssql-release.
from homebrew-mssql-release.
i also get this error when i install v18 of the drivers 🤷
Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib'
from homebrew-mssql-release.
@joelharkes Why is it trying to open v17 dylib if you installed v18? What's the command that produces that error?
from homebrew-mssql-release.
Idk, maybe i installed it earlier and it can't find it. But I uninstalled it yet it still looks for it. How could I debug it further?
from homebrew-mssql-release.
What are the exact commands you're using?
from homebrew-mssql-release.
Related Issues (20)
- Problems installing msodbcsql17 and mssql-tools HOT 3
- Error trying to run homebrew-mssql formula in mac OS Big Sur (M1) HOT 4
- I had the same error.
- Could not connect to Azure SQL Database on version 17.8.1.1 HOT 1
- My mac cannot connect to SQL Server on Windows Server 2012 R2 with Microsoft ODBC Driver 17 for SQL Server. HOT 6
- Cannot tap microsoft/mssql-release: invalid syntax in tap! HOT 3
- My Mac(m1) cannot install Microsoft ODBC 18 HOT 2
- Cannot install/update Microsoft ODBC 18 on macOS 12 HOT 2
- File not found error for MS ODBC SQL 13 on MacOS Catalina HOT 4
- Download link for msodbcsql18 seems......down? HOT 2
- This repo is missing important files
- Codesign the drivers for use within Microsoft HOT 1
- Can't connect to the server HOT 10
- Silent installs no longer possible HOT 6
- [request] Add install option as alternative to ACCEPT_EULA envvar HOT 2
- This repo is missing a LICENSE file
- weird behavior on Mac M1 when using msodbcsql18 HOT 2
- I can't connect to SQL Server (MacBook Pro M1 Pro) HOT 4
- MSodbcSQL18 is not supported on Macos 14 HOT 11
- Can't open lib ODBC Driver 18 for SQL Server / Rstudio / Mac OS HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-mssql-release.