[R] RODBC Installation fails

Marc Schwartz marc_schwartz at me.com
Mon Mar 11 22:36:23 CET 2013


On Mar 11, 2013, at 1:12 PM, jefe goode <jefe_goode at yahoo.com> wrote:

> The RODBC installation failed, with the following message ( 2 missing c header files ):
> 
> checking for sqlext.h... no
> configure: error: "ODBC headers sql.h and sqlext.h not found"
> ERROR: configuration failed for package ‘RODBC’
> * removing ‘/home/hadoop/R/i686-pc-linux-gnu-library/2.15/RODBC’
> Warning in install.packages :
>   installation of package ‘RODBC’ had non-zero exit status
> 
> The downloaded source packages are in
>     ‘/tmp/Rtmpbujdbq/downloaded_packages’
> 
> ----------------------------------------------
> 
> The operating system is Ubuntu 12.10, and I was installing via RStudio standard intall menu option.
> 
> Is there a newer version of Rodbc which has this problem fixed?
> 
> Thanks
> 
> Jefe


It is not an error with the RODBC package, but that you are missing the required 'dev' version of unixODBC on your system, which contains the missing header files required to compile the RODBC package from source, which is the default on Linuxen.

I have not used Ubuntu/Debian, but based upon a search, you appear to have two options:

1. From the CLI (outside of RStudio), run:

  sudo apt-get install unixodbc-dev

which will install the required files and then you can likely install RODBC from within RStudio as you attempted above.


2. Run:

  sudo apt-get install r-cran-rodbc

from the CLI (again, outside of RStudio), which will install a pre-compiled binary version of RODBC from the repos that Dirk Eddelbuettel (and others I believe) maintain specifically for Debian derivative Linux distributions. Then you don't need to install it from within RStudio. I believe a significant proportion of the CRAN packages are available in this fashion for Debian derivatives.


Also, as an FYI, there are two R "SIG" lists that you may want to be aware of:

  https://stat.ethz.ch/mailman/listinfo/r-sig-debian

and:

  https://stat.ethz.ch/mailman/listinfo/r-sig-db

Regards,

Marc Schwartz



More information about the R-help mailing list