[R-SIG-Mac] how to install RODBC on macOS Sierra 10.12.4?

Marc Schwartz marc_schwartz at me.com
Fri May 5 15:38:13 CEST 2017


> On May 5, 2017, at 7:51 AM, Spencer Graves <spencer.graves at prodsyse.com> wrote:
> 
> Hello:
> 
> 
>      I recently upgraded to R 3.4.0, and I've so far been unable to "install.packages('RODBC')" or "R CMD INSTALL RODBC_1.3-15.tar.gz". Both end with the following:
> 
> 
> configure: error: "ODBC headers sql.h and sqlext.h not found"
> ERROR: configuration failed for package ‘RODBC’
> 
> 
>      I had RODBC installed in R 3.3, but that was before I upgraded to macOS Sierra 10.12.4.   I've tried to RTFM, but I don't know which FMTR, and I can't decrypt the documentation I've found that seem relevant.  I couldn't find the answer in Ripley's "ODBC Connectivity" vignette.
> 
> 
>      "iodbc-42.5/iodbc/README.MACOSX" says, "You first need to install the latest Mac OS X Developer Packages, which can be found at "http://developer.apple.com/tools".  I think I've done that, but I don't know how to check it.
> 
> 
>      "iodbc-42.5/iodbc/README.MACOSX" continues, "Then, you can open the Xcode Project Builder files under mac/iODBCinst, mac/iODBC, mac/iODBCtest and mac/iODBCtestw,".  I don't know how find any of these.  It further continues, "or execute the following commands from a terminal session to build all the frameworks and demo applications:
> 
> 
>    $ cd mac
>    $ make"
> 
> 
>      I just did "$ cd mac" and got, "-bash: cd: mac: No such file or directory".  Evidently, I need to substitute something for "mac" here, but I don't know what.
> 
> 
> 
>      Suggestions?  Thanks,
>      Spencer Graves


Spencer,

The incantation that I use is:

install.packages("RODBC", type = "source", 
                 configure.args = "--with-odbc-include=/PATH.TO/iODBC/libiodbc-3.52.12/include/")

where the header files are located in the 'include' folder above, which is extracted from the iODBC source tarball available here:

  http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads#Stable%20Version%203.52.12

There is information in Prof. Ripley's RODBC vignette in Appendix A Installation on page 19.

Regards,

Marc



More information about the R-SIG-Mac mailing list