I am trying to get extension R to work with mediawiki but have run into a roadblock with the following error:
REngine.php: sh: /usr/bin/R: No such file or directory
Does anyone know how to correct this issue? If I look at mediawiki/Special:Version, I can see R listed under extensions as version 0.14, but if I try to use <R>1:10</R> it throws that error.
After the comment to add a symlink below I was able to get a little further. I added the following symlink to my brew installation of R:
ln -s /usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/bin/R /usr/bin/R
and this was the output:
REngine.php: Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so':
dlopen(/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /mediWiki/common/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so':
dlopen(/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /mediWiki/common/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
In addition: Warning message:
package 'grDevices' in options("defaultPackages") was not found
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so':
dlopen(/usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /mediWiki/common/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
In addition: Warning message:
package 'graphics' in options("defaultPackages") was not found
During startup - Warning message:
package 'stats' in options("defaultPackages") was not found
<!--- Start of program --->
[1] 1 2 3 4 5 6 7 8 9 10
<!--- End of program --->
Error: could not find function "dev.cur"
Execution halted
Also the code I hae on the mediawiki page is:
Test
<R>1:10</R>
Related
I am new to R. I was trying to install the plot3D package. The package doesn't work even after successful instalment. I am using Mac OS. following are the codes used :-
install.packages('plot3D')
library(plot3D)
I got the following error:-
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun Error: package or
namespace load failed for ‘plot3D’: .onLoad failed in loadNamespace()
for 'tcltk', details: call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/tcltk/libs/tcltk.so,
0x000A): Library not loaded: /opt/X11/lib/libX11.6.dylib Referenced
from:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/tcltk/libs/tcltk.so
Reason: tried: '/opt/X11/lib/libX11.6.dylib' (no such file),
'/Library/Frameworks/R.framework/Resources/lib/libX11.6.dylib' (no
such file), '/Users/mayank/lib/libX11.6.dylib' (no such file),
'/usr/local/lib/libX11.6.dylib' (no such file),
'/usr/lib/libX11.6.dylib' (no such file), '/lib/libX11.6.dylib' (no
such file),
'/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/server/libX11.6.dylib'
(no such file), '/var/folders/2j/3rpp744j739 In addition: Warning
message: In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout =
TRUE) : running command ''/usr/bin/otool' -L
'/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so''
had status 1
I have tried adding the path in the terminal using the solution given here and it said was successfully added but still I am unable to load the RWeka package.
It is giving me the below error -
Error: package or namespace load failed for ‘RWeka’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so, 6): Symbol not found: _EXTPTR_PTR
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
In addition: Warning message:
package ‘RWeka’ was built under R version 4.0.2
What could be done? Please Help!
So, I tried to install a package ConvergenceConcepts in RStudio and it threw me an error message:
ERROR: lazy loading failed for package ‘ConvergenceConcepts’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ConvergenceConcepts’
and a warning, that the package had non-zero exit status. How could I resolve this?
Error loading ConvergenceConcepts library:
Loading required package: tcltk
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
Error: package ‘tcltk’ could not be loaded
In addition: Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
Error when I try to add tcltk library:
library(tcltk)
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
In addition: Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
I'm having trouble installing sourceforge package 'packfor'. It was installed once successfully, then uninstalled, and upon reinstallation...
install.packages("~/Downloads/packfor_0.0-8.tar.gz", repos = NULL, type = "source")
This error appears:
Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/packfor/libs/packfor.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/packfor/libs/packfor.so, 6): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/libquadmath.0.dylib
Expected in: /usr/local/lib/libgcc_s.1.dylib
in /usr/local/lib/libquadmath.0.dylib
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/packfor’
Any ideas? If I force installation, packfor.so does exist in that directory.
I used to be able to call R from Matlab with a system call:
system('"/usr/bin/R" --no-save < myscript.R')
But now, using Matlab R2012b and R version 3.0.0 (2013-04-03) -- "Masked Marvel", I get errors when loading libraries, even though everything work just fine when I run it from the shell. I am running MacOSX 10.6.8.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object'/Library/Frameworks/R.framework/Versions/3.0/Resources/library/stats/libs/stats.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/stats/libs/stats.so, 6):
Symbol not found: __gfortran_pow_r8_i4
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/lib/libRlapack.dylib
Expected in: /Applications/MATLAB_R2012b.app/sys/os/maci64/libgfortran.2.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/lib/libRlapack.dylib
During startup - Warning message:
package 'stats' in options("defaultPackages") was not found
Unset environment variable DYLD_LIBRARY_PATH before calling R script:
>> !/usr/bin/Rscript ms.R
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/stats/libs/stats.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/stats/libs/stats.so, 6): Symbol not found: __gfortran_pow_r8_i4
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/lib/libRlapack.dylib
Expected in: /Applications/MATLAB_R2013a.app/sys/os/maci64/libgfortran.2.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/lib/libRlapack.dylib
During startup - Warning message:
package 'stats' in options("defaultPackages") was not found
Error: could not find function "rnorm"
Execution halted
>> !unset DYLD_LIBRARY_PATH; /usr/bin/Rscript ms.R
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
-0.09727 0.03573