对于 CRAN R 安装,我看到它R_X11.so
引用了以下库:
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)
该库没有引用您建议的符号:
kevin@MBP:/Library/Frameworks/R.framework/Resources/modules
$ nm R_X11.so | grep CGBitmap
但是,对于 MRO 安装,我看到以下库 + 符号:
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
并没有链接到那个,因此这些符号的查找失败。
tl;dr:Microsoft 正在向您发送损坏的软件,其中不包含提供所需符号的库的链接。请改用CRAN 提供的 R 二进制文件。