I've had this issue with some other packages as well. Tried solutions from other posts here as well, but can't seem to figure out what's wrong. I have R version 3.6 and these don't install in R or RStudio. Would really appreciate some help to figure out how to fix this.
Thanks!
install.packages("DescTools")
#> Installing package into '/usr/local/lib/R/3.6/site-library'
#> (as 'lib' is unspecified)
#> Warning in install.packages("DescTools"): installation of package 'DescTools'
#> had non-zero exit status
install.packages("randomcoloR")
#> Installing package into '/usr/local/lib/R/3.6/site-library'
#> (as 'lib' is unspecified)
#> also installing the dependency 'V8'
#> Warning in install.packages("randomcoloR"): installation of package 'V8' had
#> non-zero exit status
#> Warning in install.packages("randomcoloR"): installation of package
#> 'randomcoloR' had non-zero exit status
With given logs, it's hard to know what was exact problem.
but in randomcoloR it's obvious that V8 doesn't installed well so randomcoloR also crashed.
and V8 mentions that osX and windows can install with CRAN not linux.
I'm not sure about your session / machine information, so this may not be helpful
but you can try at least.
Any other suggestions? I've posted the entire error log for randomcoloR, hope that would be more helpful. DescTools showed similar errors, so hope that one solution will work for the other.
> install.packages("randomcoloR")
Installing package into ‘/usr/local/lib/R/3.6/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘V8’
trying URL 'https://cran.rstudio.com/src/contrib/V8_3.0.2.tar.gz'
Content type 'application/x-gzip' length 680134 bytes (664 KB)
==================================================
downloaded 664 KB
trying URL 'https://cran.rstudio.com/src/contrib/randomcoloR_1.1.0.1.tar.gz'
Content type 'application/x-gzip' length 5913 bytes
==================================================
downloaded 5913 bytes
* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=-I/usr/local/opt/v8/include -I/usr/local/opt/v8/libexec/include
Using PKG_LIBS=-L/usr/local/opt/v8/{lib,libexec} -lv8 -lv8_libplatform
** libs
rm -f V8.so RcppExports.o bindings.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.6.0_2/lib/R/include" -DNDEBUG -I/usr/local/opt/v8/include -I/usr/local/opt/v8/libexec/include -DV8_ENABLE_CHECKS -I"/usr/local/lib/R/3.6/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.6.0_2/lib/R/include" -DNDEBUG -I/usr/local/opt/v8/include -I/usr/local/opt/v8/libexec/include -DV8_ENABLE_CHECKS -I"/usr/local/lib/R/3.6/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c bindings.cpp -o bindings.o
In file included from bindings.cpp:7:
In file included from /usr/include/unistd.h:658:
/usr/include/gethostuuid.h:39:17: error: C++ requires a type specifier for all declarations
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
^
In file included from bindings.cpp:7:
/usr/include/unistd.h:665:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int getsgroups_np(int *, uuid_t);
^
/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from bindings.cpp:7:
/usr/include/unistd.h:667:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int getwgroups_np(int *, uuid_t);
^
/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from bindings.cpp:7:
/usr/include/unistd.h:730:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int setsgroups_np(int, const uuid_t);
^
/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from bindings.cpp:7:
/usr/include/unistd.h:732:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int setwgroups_np(int, const uuid_t);
^
/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
5 errors generated.
make: *** [bindings.o] Error 1
ERROR: compilation failed for package ‘V8’
* removing ‘/usr/local/lib/R/3.6/site-library/V8’
Warning in install.packages :
installation of package ‘V8’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘randomcoloR’
* removing ‘/usr/local/lib/R/3.6/site-library/randomcoloR’
Warning in install.packages :
installation of package ‘randomcoloR’ had non-zero exit status
Thanks! for the DescTools package that was the trick. For the randomcoloR / V8 I updated V8 using home-brew, then was able to install randomcoloR from CRAN, after updating packages through R studio.
Thanks so much for your help!