The Mac version of R always reports an error when installing WGCNA
1
0
Entering edit mode
562125035 • 0
@562125035-23493
Last seen 4.6 years ago
> install.packages("WGCNA")

Package which is only available in source form, and may need compilation of C/C++/Fortran:

  ‘WGCNA’

Do you want to attempt to install these from sources? (Yes/no/cancel) Yes

installing the source package ‘WGCNA’

试开URL’https://cran.rstudio.com/src/contrib/WGCNA_1.69.tar.gz'

Content type 'application/x-gzip' length 1168289 bytes (1.1 MB)

==================================================

downloaded 1.1 MB

* installing *source* package ‘WGCNA’ ...

** 成功将‘WGCNA’程序包解包并MD5和检查

** using staged installation

** libs

clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DWITH_THREADS -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c corFunctions-utils.c -o corFunctions-utils.o

clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]

corFunctions-utils.c:16:10: fatal error: 'stdio.h' file not found

#include <stdio.h>

         ^~~~~~~~~

1 error generated.

make: *** [corFunctions-utils.o] Error 1

ERROR: compilation failed for package ‘WGCNA’

* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/WGCNA’

Warning in install.packages :

  installation of package ‘WGCNA’ had non-zero exit status

The downloaded source packages are in

‘/private/var/folders/th/ftvhqscn3q39zl6wzjg314nm0000gn/T/Rtmp0mcXuU/downloaded_packages’
software error WGCNA mac • 2.0k views
ADD COMMENT
1
Entering edit mode

WGCNA is not a bioconductor package so you're not very likely to get informative answers here. Try posting this to R-SIG-Mac (R special interest group - Mac), see https://www.r-project.org/mail.html

ADD REPLY
3
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

If you want to install source packages on MacOS, you have to also have the compilers available, which is not something that happens by default. For R-4.0.0 (which you should be using, but without output from running sessionInfo, it's a mystery to us) you can just use the XCode tools.

That said, it does appear that there is a MacOS binary for WGCNA at CRAN. And additionally, WGCNA isn't actually a Bioconductor package (although people do seem to post about it here), so you should actually be asking about it on r-help@r-project.org.

ADD COMMENT

Login before adding your answer.

Traffic: 442 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6