我正在尝试使用扩展程序R与mediawiki一起使用,但遇到了包含以下错误的障碍:
REngine.php:sh:/ usr / bin / R:没有这样的文件或目录
有谁知道如何纠正这个问题?如果我查看mediawiki/Special:Version
,我可以看到R在扩展名下列为版本0.14,但如果我尝试使用<R>1:10</R>
,则会抛出该错误。
在下面添加符号链接的评论后,我能够进一步了解。我将以下符号链接添加到我的Brew安装R:
ln -s /usr/local/Cellar/r/3.1.2_1/R.framework/Versions/3.1/Resources/bin/R /usr/bin/R
这是输出:
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
此外,我在mediawiki页面上的代码是:
Test
<R>1:10</R>