无法在大苏尔安装rcurl与自制和r4.1

mutmk8jj  于 2023-04-18  发布在  其他
关注(0)|答案(2)|浏览(117)

我试图在我的macOS上安装RCurl与大苏尔和R 4.1.见下面的输出-它不工作.我真的需要它,因为我需要有GenomeInfDB.
有谁知道如何解决这个问题与'命名空间'和RCurl
非常感谢您的建议。
谢谢
桑德

install.packages("RCurl")
Installing package into ‘/opt/homebrew/lib/R/4.1/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.3.tar.gz'
Content type 'application/x-gzip' length 728630 bytes (711 KB)
==================================================
downloaded 711 KB

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for curl-config... /Users/slaan3/anaconda3/bin/curl-config
checking for gcc... gcc

【因为不符合字数,所以去掉了一点……】

ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libcrypto.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libcurl.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libssl.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libgssapi_krb5.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libxml2.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libicui18n.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libiconv.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libz.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libicudata.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/slaan3/anaconda3/lib/libicuuc.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
installing to /opt/homebrew/lib/R/4.1/site-library/00LOCK-RCurl/00new/RCurl/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/homebrew/lib/R/4.1/site-library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so':
  dlopen(/opt/homebrew/lib/R/4.1/site-library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so, 6): Symbol not found: _curl_easy_cleanup
  Referenced from: /opt/homebrew/lib/R/4.1/site-library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so
  Expected in: flat namespace
 in /opt/homebrew/lib/R/4.1/site-library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/homebrew/lib/R/4.1/site-library/RCurl’
elcex8rz

elcex8rz1#

我在macOS上开发R软件包,强烈建议不要在你的系统PATH中激活conda。这会导致R选择conda gcc,这与在macOS上构建许多R软件包不兼容。请看R for macOS Developers guide,它详细解释了这一点。或者,你可以使用Renviron文件在R中专门设置PATH。这将有助于防止编译器与conda gcc混淆。
此外,从源代码构建软件包时,建议在macOS上使用CRAN R binary安装。不建议在macOS上从源代码构建软件包时使用通过conda提供的R版本。
这可以通过Homebrew安装,使用:

brew install --cask r
f0ofjuux

f0ofjuux2#

在安装之前停用conda。

相关问题