无法为R.安装缓存包

  • 本文关键字:缓存 安装 r
  • 更新时间 :
  • 英文 :


当试图安装esquisse包时,它依赖于cachem

Error in loadNamespace(name) (esquisse_test.R#61): there is no package called ‘cachem’

尝试安装后者会产生以下结果:

Install package 'cachem'
There is a binary version available but the source version is later:
binary source needs_compilation
cachem  1.0.3  1.0.4              TRUE
installing the source package ‘cachem’
trying URL 'https://cloud.r-project.org/src/contrib/cachem_1.0.4.tar.gz'
Content type 'application/x-gzip' length 24493 bytes (23 KB)
==================================================
downloaded 23 KB
* installing *source* package ‘cachem’ ...
** package ‘cachem’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
Error in if (nzchar(SHLIB_LIBADD)) SHLIB_LIBADD else character() : 
argument is of length zero
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/cachem’
Warning in install.packages("cachem", verbose = FALSE, repos = c("https://cloud.r-project.org/"),  :
installation of package ‘cachem’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/d6/m67jyndd7h754m3810cl3bpm0000gp/T/Rtmpg35h3E/downloaded_packages’

我在macOS上使用R 4.0.2。

cachem也是RShiny的依赖关系。它似乎是一个核心库。

我关闭了R,更新到R 4.0.3,并从源代码安装了cachem,这个组合工作了。

> install.packages('shiny')
also installing the dependency ‘cachem’

There is a binary version available but the source version is later:
binary source needs_compilation
cachem  1.0.3  1.0.4              TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
trying URL 'https://cloud.r-project.org/bin/macosx/contrib/4.0/shiny_1.6.0.tgz'
Content type 'application/x-gzip' length 5411196 bytes (5.2 MB)
==================================================
downloaded 5.2 MB

The downloaded binary packages are in
/var/folders/d6/m67jyndd7h754m3810cl3bpm0000gp/T//Rtmp5nrBcF/downloaded_packages
installing the source package ‘cachem’
trying URL 'https://cloud.r-project.org/src/contrib/cachem_1.0.4.tar.gz'
Content type 'application/x-gzip' length 24493 bytes (23 KB)
==================================================
downloaded 23 KB
* installing *source* package ‘cachem’ ...
** package ‘cachem’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/usr/local/opt/llvm/bin/clang   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include   -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c cache.c -o cache.o
/usr/local/opt/llvm/bin/clang   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include   -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o cachem.so cache.o init.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.0/Resources/library/00LOCK-cachem/00new/cachem/libs
** R
** 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
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (cachem)

最新更新