无法使用Mac OS安装warbleR软件包

时间:2018-10-31 22:10:40

标签: r macos rstudio install.packages

在尝试安装warbleR软件包时,我不断收到此错误消息:

> install.packages("warbleR")
also installing the dependency ‘bioacoustics’


  There is a binary version available but the source version is later:
        binary source needs_compilation
warbleR 1.1.14 1.1.15             FALSE

Package which is only available in source form, and may need compilation of C/C++/Fortran:
  ‘bioacoustics’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source packages ‘bioacoustics’, ‘warbleR’

trying URL 'https://cran.rstudio.com/src/contrib/bioacoustics_0.1.5.tar.gz'
Content type 'application/x-gzip' length 834645 bytes (815 KB)
==================================================
downloaded 815 KB

trying URL 'https://cran.rstudio.com/src/contrib/warbleR_1.1.15.tar.gz'
Content type 'application/x-gzip' length 2348150 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

* installing *source* package ‘bioacoustics’ ...
** package ‘bioacoustics’ successfully unpacked and MD5 sums checked
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -std=gnu++11 accepts -g... yes
configure: CXX: clang++ -std=gnu++11
checking for cmake... not found
configure: error: Could not find cmake
ERROR: configuration failed for package ‘bioacoustics’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/bioacoustics’
Warning in install.packages :
  installation of package ‘bioacoustics’ had non-zero exit status
ERROR: dependency ‘bioacoustics’ is not available for package ‘warbleR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/warbleR’
Warning in install.packages :
  installation of package ‘warbleR’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/z9/6d_1kkxd0jxcj0r88hng7crm0000gn/T/RtmpSUXFDU/downloaded_packages’
> 

1 个答案:

答案 0 :(得分:0)

正如@neilfws指出的那样,可以通过运行brew install cmake的自制程序解决此问题。