R - ошибка openxlsx: ОШИБКА: ошибка компиляции для пакета 'zip' - PullRequest
0 голосов
/ 18 марта 2020

Я пытаюсь установить пакет openxlsx, используя:

install.packages("openxlsx")

, но получаю следующую ошибку:

> install.packages("openxlsx")
Installing package into '/Users/user1/Library/R/3.4/library'
(as 'lib' is unspecified)
also installing the dependency 'zip'


  There are binary versions available but the source versions are later:
         binary source needs_compilation
zip       2.0.1  2.0.4             FALSE
openxlsx  4.1.0  4.1.4              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source packages 'zip', 'openxlsx'

trying URL 'https://cran.rstudio.com/src/contrib/zip_2.0.4.tar.gz'
Content type 'application/x-gzip' length 97756 bytes (95 KB)
==================================================
downloaded 95 KB

trying URL 'https://cran.rstudio.com/src/contrib/openxlsx_4.1.4.tar.gz'
Content type 'application/x-gzip' length 1383224 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

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 'zip' ...
** package 'zip' successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package 'zip'
* removing '/Users/user1/Library/R/3.4/library/zip'
Warning in install.packages :
  installation of package 'zip' 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 'zip' is not available for package 'openxlsx'
* removing '/Users/user1/Library/R/3.4/library/openxlsx'
Warning in install.packages :
  installation of package 'openxlsx' had non-zero exit status

The downloaded source packages are in
    '/private/var/folders/lm/7w2f2m2s5hv7yx5ynjw341jh0000gn/T/Rtmp9fIQrY/downloaded_packages'

Как я могу исправить эту ошибку?

...