打开RStudio或R控制台时的警告消息 [英] Warning message when opening RStudio or the R console

查看:979
本文介绍了打开RStudio或R控制台时的警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在MacBook Pro(El Capitan 10.11.6)上安装了Microsoft R Open 3.3.1.当我打开RStudio或使用R控制台时,会收到以下警告消息:

recently I installed Microsoft R Open 3.3.1 on my MacBook Pro (El Capitan 10.11.6). When I open RStudio or I use the R console I get this warning message:

Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
  dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate
  Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Resources/modules//R_X11.so

您知道一种防止打印消息(或解决问题)的方法吗?

Do you know a way to prevent the printing of the message (or solve the issue)?

谢谢!

推荐答案

对于CRAN R安装,我看到R_X11.so引用了以下库:

For a CRAN R installation, I see that R_X11.so references the following libraries:

kevin@MBP:/Library/Frameworks/R.framework/Resources/modules
$ otool -L R_X11.so
R_X11.so:
        R_X11.so (compatibility version 0.0.0, current version 0.0.0)
        /opt/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
        /opt/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
        /opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
        /opt/X11/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
        /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
        /opt/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
        /opt/X11/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0)
        /Library/Frameworks/R.framework/Versions/3.3/Resources/lib/libR.dylib (compatibility version 3.3.0, current version 3.3.1)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)

该库未引用您建议的符号:

That library does not reference the symbol you suggest:

kevin@MBP:/Library/Frameworks/R.framework/Resources/modules
$ nm R_X11.so | grep CGBitmap

但是,对于MRO安装,我看到以下库+符号:

However, for an MRO installation, I see the following libraries + symbols:

kevin@MBP:/Volumes/Samsung 850 EVO/Library/Frameworks/R.framework/Resources/modules
$ otool -L R_X11.so
R_X11.so:
        R_X11.so (compatibility version 0.0.0, current version 0.0.0)
        /opt/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
        /opt/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
        /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
        /opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
        /opt/X11/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)
        /opt/X11/lib/libXt.7.dylib (compatibility version 8.0.0, current version 8.0.0)
        /opt/X11/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0)
        /Library/Frameworks/R.framework/Versions/3.3.1-MRO/Resources/lib/libR.dylib (compatibility version 3.3.0, current version 3.3.1)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1255.1.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)

带有参考符号:

kevin@MBP:/Volumes/Samsung 850 EVO/Library/Frameworks/R.framework/Resources/modules
$ nm R_X11.so | grep CGBitmap
                 U _CGBitmapContextCreate

这些符号通常由CoreGraphics.framework提供:

kevin@MBP:/System/Library/Frameworks/CoreGraphics.framework/Versions/A
$ nm CoreGraphics | grep CGBitmapContext
0000000000046321 T _CGBitmapContextCreate
< ... other symbols ... >

但是,MRO生成的R_X11.so没有链接到该链接,因此这些符号的查找失败.

However, the MRO-generated R_X11.so does not link to that, and so lookup of those symbols fails.

tl; dr:Microsoft正在向您提供损坏的软件,该软件不包含提供所需符号的库的链接.使用 CRAN提供的R二进制文件.

tl;dr: Microsoft is shipping you broken software that does not contain links to the libraries providing the symbols it needs. Use the CRAN-provided binaries of R instead.

这篇关于打开RStudio或R控制台时的警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆