Need some expert advise.
After i update my KNIME from 3.5 to 3.6.1 on my macbook,
all my R note can’t be execute with error promt as below:
###############
"ERROR: Could not capture output of command.ERROR: R evaluation failed.: "knime.stdout.con<-textConnection(‘knime.stdout’,‘w’);knime.stderr.con<-textConnection(‘knime.stderr’,‘w’);sink(knime.stdout.con);sink(knime.stderr.con,type=‘message’)"ERROR: R evaluation failed.: "knime.stdout.con<-textConnection(‘knime.stdout’,‘w’);knime.stderr.con<-textConnection(‘knime.stderr’,‘w’);sink(knime.stdout.con);sink(knime.stderr.con,type=‘message’)"ERROR: voidEval failedERROR: Transferring the R script to R failed.ERROR: R evaluation failed.: "knime.tmp.script"ERROR: assign failedERROR: Could not capture output of command.ERROR: R evaluation failed.: "sink();sink(type=‘message’)
close(knime.stdout.con);close(knime.stderr.con)
knime.output.ret<-c(paste(knime.stdout,collapse=’\n’), paste(knime.stderr,collapse=’\n’))
knime.output.ret"ERROR: R evaluation failed.: "sink();sink(type=‘message’)
close(knime.stdout.con);close(knime.stderr.con)
knime.output.ret<-c(paste(knime.stdout,collapse=’\n’), paste(knime.stderr,collapse=’\n’))
knime.output.ret"ERROR: eval failedERROR: Could not cleanup after command execution.ERROR: R evaluation failed.: "rm(knime.tmp.ret,knime.output.ret,knime.stdout.con,knime.stderr.con,knime.stdout,knime.stderr)"ERROR: R evaluation failed.: "rm(knime.tmp.ret,knime.output.ret,knime.stdout.con,knime.stderr.con,knime.stdout,knime.stderr)"ERROR: voidEval failedERROR: Could not execute internal command.ERROR: R evaluation failed.: "dev.off()"ERROR: R evaluation failed.: "dev.off()"ERROR: eval failedERROR: Could not execute internal command.ERROR: R evaluation failed.: "ls()"ERROR: R evaluation failed.: "ls()“ERROR: eval failed”
You will have to upgrade to the latest version of RServe which should be 1.8.6 as it fixes issues with KNIME and R on a Mac. You will have to do it via separate command not via the usual update process:
installing source package ‘Rserve’ …
** package ‘Rserve’ successfully unpacked and MD5 sums checked
checking whether to compile the server… yes
configure: error: R was configured without --enable-R-shlib or --enable-R-static-lib
*** Rserve requires R (shared or static) library. ***
*** Please install R library or compile R with either --enable-R-shlib ***
*** or --enable-R-static-lib support ***
Alternatively use --without-server if you wish to build only Rserve client.
ERROR: configuration failed for package ‘Rserve’
removing ‘/Users/ephuach/Library/R/3.5/library/Rserve’
Warning in install.packages :
installation of package ‘Rserve’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/y9/_pvs3v4554x0wdmv4qwxxwpm0000gn/T/Rtmp7QHbQF/downloaded_packages’
The error message seems to suggest it is trying to install version 1.7-3. You might have to download the newest source ( Rserve_1.8-6.tar.gz) manually from here:
You could try the .gz file not the .tar file.
And you could set the Timezone before installing. I do not think it is the problem but there were issues with that in the past.
either try it via the original command or by pointing RStudio to the path where you downloaded the tar.gz file
This message of non zero exit is a dread, I am sorry. I was able to overcome it several times by trying different approaches until success. Not very convenient I know.
After you have checked all that you might want to check the paths of your R libraries with
.libPaths()
I found on my macOS system that R somehow uses two different library paths. My understanding is it first uses the path mentioned first, but this might lead to unwanted side effects. You could try consolidating the libraries (though I am no expert in that) or specifically mentioning which libray to use with the comand (eg.)
And another thing. If you have to use the newest version of RServe you will have to compile the package. On MacOS you will need the packages mentioned on the relevant R website:
I recently noted that at least when compiling the RServe package Rtools does not like to sit in a directory with blanks in the path name, so better have it at a place like
c:\rtools
rather then:
c\my programs\my little r collection\R-Tools