On Apr 19, 2010, at 7:02 PM, David Scott wrote:
> I have a problem with some missing headers when trying to install RODBC on
my linux box.
>
> > install.packages("RODBC",
> + lib="/usr/local/david/R")
> trying URL
'http://cran.stat.auckland.ac.nz/src/contrib/RODBC_1.3-1.tar.gz'
> Content type 'application/x-gzip' length 990220 bytes (967 Kb)
> opened URL
> =================================================> downloaded 967 Kb
>
>
> Read .Rprofile
> * installing *source* package ?RODBC? ...
> checking for gcc... gcc -m32 -std=gnu99
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -m32 -std=gnu99 accepts -g... yes
> checking for gcc -m32 -std=gnu99 option to accept ANSI C... none needed
> checking how to run the C preprocessor... gcc -m32 -std=gnu99 -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking sql.h usability... no
> checking sql.h presence... no
> checking for sql.h... no
> checking sqlext.h usability... no
> checking sqlext.h presence... no
> checking for sqlext.h... no
> configure: error: "ODBC headers sql.h and sqlext.h not found"
> ERROR: configuration failed for package ?RODBC?
> * removing ?/usr/local/david/R/RODBC?
>
>
> Details of my setup are:
>
> > R.version
> _
> platform i386-redhat-linux-gnu
> arch i386
> os linux-gnu
> system i386, linux-gnu
> status
> major 2
> minor 10.0
> year 2009
> month 10
> day 26
> svn rev 50208
> language R
> version.string R version 2.10.0 (2009-10-26)
>
> I have the following mysql setup
>
> mysql> status;
> --------------
> mysql Ver 14.12 Distrib 5.0.88, for redhat-linux-gnu (i386) using readline
5.1
>
> Connection id: 9
> Current database:
> Current user: root at localhost
> SSL: Not in use
> Current pager: stdout
> Using outfile: ''
> Using delimiter: ;
> Server version: 5.0.88 Source distribution
> Protocol version: 10
> Connection: Localhost via UNIX socket
> Server characterset: latin1
> Db characterset: latin1
> Client characterset: latin1
> Conn. characterset: latin1
> UNIX socket: /var/lib/mysql/mysql.sock
> Uptime: 95 days 19 hours 18 min 27 sec
>
>
> I am guessing my MySQL is getting a bit decrepit and needs updating, but
welcome any suggestions about sorting this out.
>
>
> David Scott
The missing header files are contained in the unixODBC-devel RPM, which you will
need to install and then you should be able to install RODBC. Recent RH/Fedora
installations use 'yum' for package management, so something like:
yum install unixODBC-devel
as root, should get you what you need.
Also, there is the R package RMySQL which provides an alternative interface to
MySQL, if you should wish to investigate that approach.
Finally, there is the R-SIG-DB list which provides a focused audience for R and
DB related matters:
https://stat.ethz.ch/mailman/listinfo/r-sig-db
HTH,
Marc Schwartz