【发布时间】:2019-11-28 05:26:15
【问题描述】:
当我安装包“maps”时,安装中出现警告:
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:
"___sprintf_chk", referenced from:
_to_ascii in Gmake-02a515.o
"___stack_chk_fail", referenced from:
_to_ascii in Gmake-02a515.o
....
"_strlen", referenced from:
_to_ascii in Gmake-02a515.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [<builtin>: Gmake] Error 1
make[1]: Leaving directory '/private/var/folders/l4/tmczrb0d7259bm_cqcy02y9w0000gn/T/Rtmpnbfu8d/R.INSTALLa802101e8d4/maps/src'
make: *** [Makefile:58: gmake] Error 2
ERROR: compilation failed for package ‘maps’
* removing ‘/anaconda3/lib/R/library/maps’
Warning in install.packages :
installation of package ‘maps’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/l4/tmczrb0d7259bm_cqcy02y9w0000gn/T/RtmpISL1l9/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
当我跑步时
library(maps)
它给出了以下错误:
Error in library(maps) : there is no package called ‘maps’
【问题讨论】:
-
很好奇,我从未见过这种情况。您是否尝试过良好的 Windows 修复:重新启动 R?
-
这很奇怪。我对其他库没有同样的问题。是的,我已经重新启动了 R。
-
也许是个愚蠢的问题,但我不得不问:安装中是否有任何警告(甚至看似无害)? (通常关于安装问题的问题是(a)包括所有文本,我们可以看到它看起来很奇怪,或者(b)不包括任何中间警告/错误,在这种情况下,很明显提问者不知道阅读安装消息/警告/错误。)您是否尝试再次安装?
-
我一直觉得奇怪的是非零退出状态弹出为 警告 而不是错误。我还没有看到非零退出状态产生正确安装的包(尽管它可能是可行的)。因此,为了能够为您提供帮助,我们需要查看该临时文本,因为现在很明显它没有成功安装。
-
我看到了来自 clang 的消息。 R 通常使用 gcc 编译。使用 clang 编译包而使用 gcc 编译 r 会产生问题(例如缺少符号)。
标签: r install.packages