[R] Troubles with stemming (tm + Snowball packages) under MacOS
Julien Velcin
julien.velcin at univ-lyon2.fr
Mon Jan 16 13:07:15 CET 2012
Ok but unfortunately JGR doesn't work when run as root! I think this
is because the packages needed (e.g., rWeka) are installed locally
(for the user). The installation "at system level (in R framework)"
fails:
"Currently it is not possible to install binary packages from a remote
repository as root.
Please use the CRAN binary of R to allow admin users to install system-
wide packages without becoming root. Alternatively you can either use
command-line version of R as root or install the packages from local
files."
If I follow these advices (launch R as a root and try to install the
package manually):
> install.packages('RWeka')
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... Error: .onLoad failed in loadNamespace()
for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/
R.framework/Versions/2.14/Resources/library/tcltk/libs/x86_64/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/
library/tcltk/libs/x86_64/tcltk.so, 10): Library not loaded: /usr/
local/lib/libtcl8.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.14/
Resources/library/tcltk/libs/x86_64/tcltk.so
Reason: image not found
Julien
On Jan 16, 2012, at 11:47 AM, Milan Bouchet-Valat wrote:
> Le lundi 16 janvier 2012 à 11:27 +0100, Julien Velcin a écrit :
>> I had already seen this post. If I'm logged as root (it is possible
>> under macosx), here is the result:
>>
>> * First run:
>>
>>> reuters <- tm_map(reuters, stemDocument)
>> Error in .jnew(name) :
>> java.lang.InternalError: Can't start the AWT because Java was
>> started on the first thread. Make sure StartOnFirstThread is not
>> specified in your application's Info.plist or on the command line
>> Unable to create WEKA_HOME (/Users/admin/wekafiles)
>> Unable to create packages directory (/Users/admin/wekafiles/packages)
>> Unable to create repository cache directory (/Users/admin/wekafiles/
>> repCache)
>> Unable to create WEKA_HOME (/Users/admin/wekafiles)
>> Unable to create packages directory (/Users/admin/wekafiles/packages)
>> Unable to create repository cache directory (/Users/admin/wekafiles/
>> repCache)
>> Refreshing GOE props...
> Running as root doesn't mean you can bypass the JGR trick. I think
> you're experiencing two different problems here, so you still need to
> apply the workaround for the first one.
>
>
> Cheers
More information about the R-help
mailing list