how to install RODBC on macOS Sierra 10.12.4

僤鯓⒐⒋嵵緔 提交于 2019-12-08 18:32:28
Spencer Graves

I solved the problem with:

ODBC_INCLUDE=/path/to/libiodbc-srcs/include R CMD INSTALL RODBC

where "/path/to/libiodbc-srcs/include" is the path to the "include" folder containing the missing files, "sql.h" and "sqlext.h". In my case it was something like '~/Documents/Rstuff/iodbc-42.5/iodbc/include', which I checked with the following in R:

dir('~/Documents/current/Rstuff/iodbc-42.5/iodbc/include')

Then the following worked for me:

ODBC_INCLUDE=~/Documents/current/Rstuff/iodbc-42.5/iodbc/include R CMD INSTALL RODBC

This is described in p. 19 of https://cran.r-project.org/web/packages/RODBC/vignettes/RODBC.pdf, except that contains a stray quote (<'>), which threw me off the first few times I read it, because was not familiar with that syntax.

On R-Sig-Mac, Marc Schwartz offered two suggestions: First, Installation of RODBC on OS X Yosemite, which may work with "brew"; I didn't try that, because I got the above to work first.

Second:

install.packages("RODBC", type = "source", 
    configure.args = "--with-odbc-include=/path/to/libiodbc-srcs/include/")

This should work also with the path substitution mentioned above.

I hope this helps someone else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!