[R] Can't load e1071

Dirk Eddelbuettel edd at debian.org
Wed Jun 25 03:33:54 CEST 2003


On Tue, Jun 24, 2003 at 08:44:57PM -0400, Andrew Perrin wrote:
> > [ It is considered impolite to reply to private messages via the list. ]
> 
> Sorry for any impoliteness. I was trying to ask the whole list, since I
> suspect the two issues are different.

That's fine, and your privilege. But as a general rule, do not relay private
messages.

> > You misunderstand:  R in Debian is in unstable. e1071 is an add-on package
> > that always loaded without any issues.
> >
> 
> No, I don't misunderstand. R 1.7.0 is in debian-stable, which is why it's

False. Debian 'stable' has 1.5.0 (in a bugfix release). Debian 'testing' has
1.6.0. CRAN has a testing release of 1.7.0 which is probably what you have.

> > library(e1071)
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>         unable to load shared library
> "/usr/local/lib/R/site-library/e1071/libs/e1071.so":
>   /usr/local/lib/R/site-library/e1071/libs/e1071.so: cannot dynamically
> load executable
> Error in library(e1071) : .First.lib failed
> 
> ...even though /usr/local/lib/R/site-library/e1071/libs/e1071.so exists
> and is readable.

So remove e1071 and reinstall, but see further down.

> The first problem I had is that R apparently assumes that g++-3.0 will be
> the compiler, since:
> 
> aperrin at joehill:/usr/local/lib/R/site-library/e1071/libs$ R CMD config CXX
> g++-3.0
> 
> 
> ...even if g++-3.0 isn't installed on the machine:
> joehill:/usr/src/e1071# dpkg -l | grep g++
> ii  g++            2.95.4-14      The GNU C++ compiler.
> ii  g++-2.95       2.95.4-11woody The GNU C++ compiler.

That doesn't matter. What matters is what is hard-coded from _R built time_
in $RHOME/etc/Makeconf (which on Debian is also /etc/R/Makeconf).  Have a
look at that file, it will have hints as to under which version your
r-base-core package was built. I.e. mine shows in FLIBS that 3.3 was used.

But a much simpler way is to use the Debian package management system --
look at the Depends line of 'dpkg -s r-base-core'. Mine has e.g.  
     libg2c0 (>= 1:3.3-0pre9)
revealing that g77 from gcc version 3.3 was used, consistent with what FLIBS
had.     

> If I install g++-3.0, then install e1071 from the net, the installation
> works fine, but using the library gives the error above.

You were probably mis-matching gcc/g++ versions between the version of R you
got from CRAN and the compiler you have installed.

Hope this helps, feel free to ask me in private if you're still fuzzy.

Dirk

-- 
Don't drink and derive. Alcohol and analysis don't mix.




More information about the R-help mailing list