2

我正在尝试在 macbookpro 2014 和优胜美地上安装包 png。

我正在使用 RRO(但我相信我会遇到与 R 类似的问题)。

这是我在 RRO 控制台上看到的内容:

* installing *source* package ‘png’ ...
** package ‘png’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    `libpng-config --cflags` -fPIC  -Wall -mtune=core2 -g -O2  -c read.c -o read.o
/bin/sh: libpng-config: command not found
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    `libpng-config --cflags` -fPIC  -Wall -mtune=core2 -g -O2  -c write.c -o write.o
/bin/sh: libpng-config: command not found
/bin/sh: libpng-config: command not found
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o png.so read.o write.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
/bin/sh: libpng-config: command not found
installing to /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so, 6): Symbol not found: _png_create_info_struct
  Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so
Error: loading failed
Execution halted
ERROR: loading failed

另一方面,我已经安装(使用自制软件)libpng,我可以在终端上输入 libpng-config 并得到响应

Usage: /usr/local/bin/libpng-config [OPTION] ...

我的选择已经不多了...

4

0 回答 0