OSX 10.11在R中安装'png'包失败了

时间:2016-01-07 21:26:23

标签: r macos osx-elcapitan libpng install.packages

R是由自制软件安装的,这里是     R版本3.2.3(2015-12-10)     平台:x86_64-apple-darwin15.2.0(64位)     运行于:OS X 10.11(El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.4.3

loaded via a namespace (and not attached):
[1] magrittr_1.5   R6_2.1.1       assertthat_0.1 parallel_3.2.3 DBI_0.3.1      tools_3.2.3    Rcpp_0.12.2  

当我尝试安装'png'时,它会返回以下消息:

Installing package into ‘/usr/local/lib/R/3.2/site-library’
(as ‘lib’ is unspecified)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0         0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100 24990  100 24990    0     0      32041      0 --:--:-- --:--:-- --:--:-- 32038
* installing *source* package ‘png’ ...
** package ‘png’ successfully unpacked and MD5 sums checked
** libs
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/    usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I    /usr/local/opt/jpeg/include  -I/usr/local/include   `libpng-config --cflags` -fPIC  -I/usr/local/    opt/gsl/include -c read.c -o read.o
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/    usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I    /usr/local/opt/jpeg/include  -I/usr/local/include   `libpng-config --cflags` -fPIC  -I/usr/local/    opt/gsl/include -c write.c -o write.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -    multiply_defined suppress -L/usr/local/Cellar/r/3.2.3/R.framework/Resources/lib -L/usr/local/opt/    gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/jpeg/ -L/    usr/local/opt/gsl/lib -lgsl -lgslcblas -o png.so read.o write.o -L/usr/local/opt/gettext/lib -F/usr    /local/Cellar/r/3.2.3/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.2/site-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 '/usr/local/lib/R/3.2/site-library/png/libs/png.so':
  dlopen(/usr/local/lib/R/3.2/site-library/png/libs/png.so, 6): Symbol not found:     _png_create_info_struct
  Referenced from: /usr/local/lib/R/3.2/site-library/png/libs/png.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.2/site-library/png/libs/png.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.2/site-library/png’
Warning in install.packages :
  installation of package ‘png’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/h4/1wm7nk_x05d0s_nzd1bgh84c0000gn/T/Rtmpcfpi82/downloaded_packages’    

看起来libpng安装不正确。所以我用自制软件重新安装它,但这个问题仍然存在。我试图从源代码安装它,但也失败了。

另外,我无法安装软件包'jpeg',错误信息与上面的类似:'找不到符号:_jpeg_CreateCompress'。

0 个答案:

没有答案