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
odbcListDrivers does not show list #341
Comments
Is it possible that the odbc package was compiled against iODBC rather than unixODBC? Try reinstalling it and look at the The other thing you might try is putting the diver information in a user level config rather than a server one. Another thing would be updated your version of unixODBC. 2.3.1 is over 8 years old, it was released in November of 2011. |
I see the following PKG_CFLAGS and PKG_LIBS when reinstalling odbc Found odbc_config cflags and libs!
PKG_CFLAGS=-DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include
PKG_LIBS=-L/usr/lib64 -lodbc Putting the driver information at user level did not work. I will try to update the unixODBC driver, to see if that works |
I found a solution. I have set the following environment variable: |
Glad you have worked out the solution! |
For anyone else still stuck on this issue - I spent a couple of hours trying to get the I normally use a windows machine and never had this issue before, so was kind of out of my depth trying to figure it out. There are a couple of questions on StackOverflow and in the issues section of r-dbi/odbc github with various answers - but none worked for me. I thought I’d post a detailed answer to how I solved it for my Mac. RStudio has a guide on setting up drivers for Windows/Mac/Linux machines. After installing unixODBC and your drivers (PostgreSQL for example) you are meant to edit the following two files On my Mac, I didn’t know where to look so I went searching and found it at This file had the driver information in it that I assumed would show up using After a lot of googling, I found the following command to type into mac terminal Note the leading dot in The dot denotes hidden files. Type After navigating to I opened up I jumped back into the R console and finally, I could return values using |
Thank you a lot, BilboBaagins! |
I tried all the above solutions and more, to no avail. When I installed the development version using |
It worked for me! Thanks! I'd tried everything but the only solution for me was to set ODBCSYSINI="/" It wasn't necessary to create or edit /Library/ODBC/odbcinst.ini or /Library/ODBC/odbc.ini. Here are two other interesting solutions that didn't work for me. I leave it just in case. |
For MSSQL driver install on Intel Mac (Ventura) and R 4.3.1, I created the symlinks mentioned under Troubleshooting, but My solution:
|
@baderstine Thanks for this post, after searching the answer everywhere, your solution worked very well in my new M3 Max. |
Issue Description and Expected Result
Hello, odbc::odbcListDrivers() does not show any drivers in my R session
I have installed the following packages:
then I am able to see the underlying odbc drivers:
But when I start a R session, I can not see the listed drivers:
Database
mysql-connector
postgresql
Reproducible Example
Session Info
The text was updated successfully, but these errors were encountered: