在 anaconda 中更新 R 包但出现 clang-12 错误
Updating R packages in anaconda but getting a clang-12 error
我在 mac m1 machine 上。我在 Anaconda 中使用 RStudio,我想使用更新按钮更新 R 包。但是,当我尝试更新时,我对许多软件包都遇到了同样的错误。这是一个例子:
> install.packages("askpass")
trying URL 'https://cran.rstudio.com/src/contrib/askpass_1.1.tar.gz'
Content type 'application/x-gzip' length 5730 bytes
==================================================
downloaded 5730 bytes
* installing *source* package ‘askpass’ ...
** package ‘askpass’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/kaili/opt/anaconda3/envs/renv/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/kaili/opt/anaconda3/envs/renv/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/kaili/opt/anaconda3/envs/renv/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/kaili/opt/anaconda3/envs/renv=/usr/local/src/conda-prefix -c askpass.c -o askpass.o
x86_64-apple-darwin13.4.0-clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/kaili/opt/anaconda3/envs/renv/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/kaili/opt/anaconda3/envs/renv/lib -L/Users/kaili/opt/anaconda3/envs/renv/lib -o askpass.dylib askpass.o -L/Users/kaili/opt/anaconda3/envs/renv/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/kaili/opt/anaconda3/envs/renv/lib/R/share/make/shlib.mk:6: askpass.dylib] Error 1
ERROR: compilation failed for package ‘askpass’
* removing ‘/Users/kaili/opt/anaconda3/envs/renv/lib/R/library/askpass’
* restoring previous ‘/Users/kaili/opt/anaconda3/envs/renv/lib/R/library/askpass’
Warning in install.packages :
installation of package ‘askpass’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/18/sx26824d315c28x_q4qg2t3h0000gn/T/RtmpVpPrtm/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
我是 R 和 Anaconda 的新手,不知道问题出在哪里。任何提示将不胜感激。谢谢!
使用 Conda 管理的 R 环境时,避免使用 install.packages()
更简单,尤其是当包涉及编译时。相反,更喜欢使用 Conda 进行安装。在这种特殊情况下,使用
conda install -n renv -c conda-forge r-askpass
来自 shell 会话。
我在 mac m1 machine 上。我在 Anaconda 中使用 RStudio,我想使用更新按钮更新 R 包。但是,当我尝试更新时,我对许多软件包都遇到了同样的错误。这是一个例子:
> install.packages("askpass")
trying URL 'https://cran.rstudio.com/src/contrib/askpass_1.1.tar.gz'
Content type 'application/x-gzip' length 5730 bytes
==================================================
downloaded 5730 bytes
* installing *source* package ‘askpass’ ...
** package ‘askpass’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/kaili/opt/anaconda3/envs/renv/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/kaili/opt/anaconda3/envs/renv/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/kaili/opt/anaconda3/envs/renv/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/kaili/opt/anaconda3/envs/renv=/usr/local/src/conda-prefix -c askpass.c -o askpass.o
x86_64-apple-darwin13.4.0-clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/kaili/opt/anaconda3/envs/renv/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/kaili/opt/anaconda3/envs/renv/lib -L/Users/kaili/opt/anaconda3/envs/renv/lib -o askpass.dylib askpass.o -L/Users/kaili/opt/anaconda3/envs/renv/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/kaili/opt/anaconda3/envs/renv/lib/R/share/make/shlib.mk:6: askpass.dylib] Error 1
ERROR: compilation failed for package ‘askpass’
* removing ‘/Users/kaili/opt/anaconda3/envs/renv/lib/R/library/askpass’
* restoring previous ‘/Users/kaili/opt/anaconda3/envs/renv/lib/R/library/askpass’
Warning in install.packages :
installation of package ‘askpass’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/18/sx26824d315c28x_q4qg2t3h0000gn/T/RtmpVpPrtm/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
我是 R 和 Anaconda 的新手,不知道问题出在哪里。任何提示将不胜感激。谢谢!
使用 Conda 管理的 R 环境时,避免使用 install.packages()
更简单,尤其是当包涉及编译时。相反,更喜欢使用 Conda 进行安装。在这种特殊情况下,使用
conda install -n renv -c conda-forge r-askpass
来自 shell 会话。