On Jan 4, 2012, at 8:02 AM, Milan Bouchet-Valat wrote:

> Le mardi 03 janvier 2012 à 11:39 -0800, gregory benison a écrit :
>> If one attempts to install RODBC (via install.packages('RODBC'))
>> without having an ODBC driver installed, this error message results:
>> 
>> 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/lib/R/library/RODBC'
>> 
>> Yes, the RODBC README describes the needed prerequisites, but for
>> someone who just wants to use RODBC and tries to install it in the
>> most natural way, i.e. from "R Installation and Administration":
>> 
>>> For most users it suffices to call ‘install.packages(pkgname)’
> I guess this applies only to users installing binary packages. If you
> build packages from source, the build system runs ./configure, which
> returns this automated message.
> 
> Ideally, you shouldn't need to build packages from source when all you
> want is use them... (Distributions could ship binary packages that R
> would detect and install automatically?)

That is up to the resources available for each Linux distribution. Debian based 
distributions have done a better job of this for R than most, largely due to 
Dirk et al making the commitment and taking the time over the years to support 
a large number of CRAN packages via apt. 

However, there is not the same level of commitment for others (eg. Fedora, 
RHEL/CentOS, etc.), leaving most others to install from source, thus requiring 
users to manually satisfy pre-requisites for installation. R itself is 
available for installation via binary, but the selection of CRAN packages is 
much more limited.

As Duncan noted, the message is pretty clear in that the ODBC header files are 
missing, which are required to compile RODBC from source. On RH based Linuxen, 
this requires the installation of the unixODBC-devel RPM, much as one would 
need to have other *-devel RPMs (eg. readline-devel) installed for compiling 
many applications from source. 

In years past, the *-devel RPMs were frequently installed by default, but as 
the Linux community has evolved, current defaults tend to not install 
'development' related packages, which include compilers and related tools. This 
allows for smaller footprints for the installed OS for non-technical end users.

If you are going to use R on Linux, you need to be prepared to get your hands 
dirty under the hood at a lower level than if you are using Windows or OSX. 

In this particular case, Prof. Ripley has taken great pains to provide 
documents to guide the user on the installation of not only RODBC itself, but 
other components of the ODBC ecosystem to get things working.

Regards,

Marc Schwartz

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to