In R 3.4.0,
install.packages('RODBC', type='source')
fails on macOS 10.12.4. I also downloaded RODBC_1.3-15.tar.gz
from CRAN and tried,
R CMD INSTALL RODBC_1.3-15.tar.gz
In both cases, I got "ODBC headers sql.h and sqlext.h not found". A discussion of this in Installation of RODBC/ROracle packages on OS X Mavericks says the following:
To fix this, you need to download the latest version of iODBC (www.iodbc.org), and then unzip the file and set your header and library search paths to the location where you put the unzipped package. If you don't know how to set your search paths, you could just put the header files (
sql.h
andsqlext.h
) in the/usr/include
directory, and thelibiodbc.a
file in the/usr/lib
directory.
I downloaded iodbc-42.5.tar.gz
and untarred it into a directory next to RODBC, untarred from RODBC_1.3-15.tar.gz
. Sadly, I can't find how to set header and library search paths, and when I try to put the header files in /usr/include
, the system won't let me.
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. [In fact, I think I've done it multiple times: The message ODBC headers sql.h and sqlext.h not found
, disappeared for a while from the still-negative response to install.packages('RODBC', type='source')
, only to reappear later after I successfully installed port
and ran sudo port install gcc6
. Then I got ODBC headers sql.h and sqlext.h not found
again.]
iodbc-42.5/iodbc/README.MACOSX
continues,
Then, you can open the Xcode Project Builder files under
mac/iODBCinst
,mac/iODBC
,mac/iODBCtest
andmac/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 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. ???
Thanks.