Skip to content
Prev 8888 / 15075 Next

Package seems to be present but library don't find it

On Apr 3, 2012, at 3:09 PM, Berend Hasselman wrote:

            
Ah, now I got it -- this is a very nice user error, the GUI is entirely innocent here -- note that the default in install.packages() is *binary* installation and .tar.gz is the format of both source and binary packages on OS X, so R will happily treat the downloaded source package as binary so you don't get any output, because the package is simply unpacked and not compiled. However, that is not a valid package so you can't load it.

What the user intended was
* installing *source* package ?HelloWorld? ...
** R
** preparing package for lazy loading
** help
Warning: /private/var/folders/Sq/SqwOn3XRE7WB0ZmJXYRnfE+++TI/-Tmp-/RtmpxI4NuG/R.INSTALL144c53d879430/HelloWorld/man/HelloWorld-package.Rd:32: All text must be in a section
Warning: /private/var/folders/Sq/SqwOn3XRE7WB0ZmJXYRnfE+++TI/-Tmp-/RtmpxI4NuG/R.INSTALL144c53d879430/HelloWorld/man/HelloWorld-package.Rd:33: All text must be in a section
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) : undefined exports: HelloWorld
Error: loading failed
Execution halted
ERROR: loading failed
* removing ?/Library/Frameworks/R.framework/Versions/2.14/Resources/library/HelloWorld?
* restoring previous ?/Library/Frameworks/R.framework/Versions/2.14/Resources/library/HelloWorld?
Warning message:
In install.packages("HelloWorld_1.0.tar.gz", repos = NULL, type = "source") :
  installation of package ?HelloWorld_1.0.tar.gz? had non-zero exit status


which fails as it should ...

So the only thing here is that binary install should perhaps check the content and refuse to install source package as binary or something like that ... there is not such problem in Windows, because there the binaries use different format altogether (zip vs tgz).

Cheers,
Simon