Пакеты R хранятся в неправильном месте

Я хочу, чтобы R работал гладко на Rstudio, а также на ноутбуке Jupiter.

У меня были некоторые проблемы с недоступными шрифтами, поэтому сегодня я переустановил R и Rstudio, а также сделал необходимые шрифты доступными на всем компьютере. Таким образом, у меня больше нет проблемы со шрифтом.

Но теперь, когда я пытаюсь переустановить нужные мне пакеты, они недоступны для R. Например, когда я пытаюсь установить dplyr, происходит следующее:

> install.packages("dplyr")
also installing the dependencies 'pillar', 'lifecycle', 'rlang', 'tibble', 'tidyselect', 'vctrs'

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.0.tar.gz'
Content type 'application/x-gzip' length 1100197 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
==================================================
downloaded 81 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.10.tar.gz'
Content type 'application/x-gzip' length 915685 bytes (894 KB)
==================================================
downloaded 894 KB

trying URL 'https://cran.rstudio.com/src/contrib/tibble_3.1.1.tar.gz'
Content type 'application/x-gzip' length 686855 bytes (670 KB)
==================================================
downloaded 670 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_1.1.0.tar.gz'
Content type 'application/x-gzip' length 90842 bytes (88 KB)
==================================================
downloaded 88 KB

trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.3.7.tar.gz'
Content type 'application/x-gzip' length 782590 bytes (764 KB)
==================================================
downloaded 764 KB

trying URL 'https://cran.rstudio.com/src/contrib/dplyr_1.0.5.tar.gz'
Content type 'application/x-gzip' length 949019 bytes (926 KB)
==================================================
downloaded 926 KB

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'rlang' ...
** package 'rlang' successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/Tinius/opt/anaconda3/lib/R/include" -DNDEBUG -I./lib/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/Tinius/opt/anaconda3/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/Tinius/opt/anaconda3/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/Tinius/opt/anaconda3=/usr/local/src/conda-prefix  -c capture.c -o capture.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [capture.o] Error 127
ERROR: compilation failed for package 'rlang'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/rlang'
* restoring previous '/Users/Tinius/opt/anaconda3/lib/R/library/rlang'
Warning in install.packages :
  installation of package 'rlang' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'lifecycle'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/lifecycle'
Warning in install.packages :
  installation of package 'lifecycle' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'vctrs' ...
** package 'vctrs' successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/Tinius/opt/anaconda3/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/Tinius/opt/anaconda3/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/Tinius/opt/anaconda3/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/Tinius/opt/anaconda3=/usr/local/src/conda-prefix  -c altrep-rle.c -o altrep-rle.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [altrep-rle.o] Error 127
ERROR: compilation failed for package 'vctrs'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/vctrs'
Warning in install.packages :
  installation of package 'vctrs' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
ERROR: dependencies 'lifecycle', 'vctrs' are not available for package 'pillar'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/pillar'
Warning in install.packages :
  installation of package 'pillar' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
ERROR: dependency 'vctrs' is not available for package 'tidyselect'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/tidyselect'
Warning in install.packages :
  installation of package 'tidyselect' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
ERROR: dependencies 'lifecycle', 'pillar', 'vctrs' are not available for package 'tibble'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/tibble'
Warning in install.packages :
  installation of package 'tibble' had non-zero exit status
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
ERROR: dependencies 'lifecycle', 'tibble', 'tidyselect', 'vctrs' are not available for package 'dplyr'
* removing '/Users/Tinius/opt/anaconda3/lib/R/library/dplyr'
Warning in install.packages :
  installation of package 'dplyr' had non-zero exit status

The downloaded source packages are in
    '/private/var/folders/wp/g4z3sz4d2tvd5sx0s5r796xw0000gn/T/RtmpVNkKcX/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Таким образом, похоже, что пакеты установлены под anaconda (я использовал ноутбук Jupiter, а также Rstudio для R). Когда я запускаю .libPaths, я получаю [1] "/Users/Tinius/opt/anaconda3/lib/R/library".

Из здесь я вижу, что предложенные пути принципиально отличаются от пути, который у меня есть.

Если кто-то может мне помочь, я был бы очень благодарен!

Мои настройки: MacBook Pro (Retina, 13 дюймов, середина 2014 г.), Mojave 10.14.4 и

> version
               _                           
platform       x86_64-apple-darwin13.4.0   
arch           x86_64                      
os             darwin13.4.0                
system         x86_64, darwin13.4.0        
status                                     
major          3                           
minor          6.1                         
year           2019                        
month          07                          
day            05                          
svn rev        76782                       
language       R                           
version.string R version 3.6.1 (2019-07-05)
nickname       Action of the Toes  

ИЗМЕНИТЬ:

Я сделал то, что здесь написано:

Установка R на Mac - Предупреждающие сообщения: установка LC_CTYPE не удалась, используя C

Что убрало ошибку запуска из вывода выше, но основная проблема осталась.

> install.packages("dplyr")
also installing the dependencies ‘pillar’, ‘lifecycle’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘vctrs’

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.0.tar.gz'
Content type 'application/x-gzip' length 1100197 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
==================================================
downloaded 81 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.11.tar.gz'
Content type 'application/x-gzip' length 861727 bytes (841 KB)
==================================================
downloaded 841 KB

trying URL 'https://cran.rstudio.com/src/contrib/tibble_3.1.1.tar.gz'
Content type 'application/x-gzip' length 686855 bytes (670 KB)
==================================================
downloaded 670 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_1.1.1.tar.gz'
Content type 'application/x-gzip' length 92088 bytes (89 KB)
==================================================
downloaded 89 KB

trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.3.8.tar.gz'
Content type 'application/x-gzip' length 782608 bytes (764 KB)
==================================================
downloaded 764 KB

trying URL 'https://cran.rstudio.com/src/contrib/dplyr_1.0.5.tar.gz'
Content type 'application/x-gzip' length 949019 bytes (926 KB)
==================================================
downloaded 926 KB

* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/Tinius/opt/anaconda3/lib/R/include" -DNDEBUG -I./lib/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/Tinius/opt/anaconda3/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/Tinius/opt/anaconda3/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/Tinius/opt/anaconda3=/usr/local/src/conda-prefix  -c capture.c -o capture.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [capture.o] Error 127
ERROR: compilation failed for package ‘rlang’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/rlang’
* restoring previous ‘/Users/Tinius/opt/anaconda3/lib/R/library/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘lifecycle’ ...
** package ‘lifecycle’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.4.5 is being loaded, but >= 0.4.10 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/lifecycle’
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/Tinius/opt/anaconda3/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/Tinius/opt/anaconda3/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/Tinius/opt/anaconda3/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/Tinius/opt/anaconda3=/usr/local/src/conda-prefix  -c altrep-rle.c -o altrep-rle.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [altrep-rle.o] Error 127
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status
ERROR: dependency ‘vctrs’ is not available for package ‘tidyselect’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘pillar’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘tibble’, ‘tidyselect’, ‘vctrs’ are not available for package ‘dplyr’
* removing ‘/Users/Tinius/opt/anaconda3/lib/R/library/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/wp/g4z3sz4d2tvd5sx0s5r796xw0000gn/T/RtmpiqiZDx/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

В основном разрешено

В Rstudio все работает гладко, потому что я:

в основном удалены anaconda, R и Rstudio, обновлены с Mojave до Big Sur и переустановлены Р и РСтудио.


person Tinius    schedule 27.04.2021    source источник