0

i am trying to install RODBC with the commadn R CMD INSTALL -l /my/local/path RODBC.tar.gz and it wont find sql.h and sqlext.h ..how do i pass the include and lib paths to this command?

Palace Chan
  • 8,845
  • 11
  • 41
  • 93

1 Answers1

4

I had a similar problem recently while trying to install RODBC on an instance of Centos 5.8 x64. (Instead of using R CMD install, I just did sudo R, then installed the package inside R - but I was still having the same problem).

I resolved this by installing the following packages using yum:

unixODBC
unixODBC-libs
unixODBC-devel
mysql-connector-odbc
freetds
freetds-devel

Those last two are necessary because I was interfacing with an MSSQL server, which requires TDS. Anyway, once I installed unixODBC and the libs and development package, I was able to install RODBC with no difficulty (again, using sudo R and then install.packages("RODBC").

The only other thing to do is install the correct drivers/libraries for ODBC, which is what mysql-connector-odbc is. You will need to configure unixODBC to meet your needs, but the documentation is pretty solid, so I don't think you'll have too much difficulty.

TARehman
  • 6,659
  • 3
  • 33
  • 60