Hi All!
I am new to R studio and have just installed it on my Mac.
I tried installing tidyverse package many a time using install.package("tidyverse") and then loading it using library(tidyverse). This is how it goes:
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/gm/fknd6g856231bvh1fd9wmp500000gn/T/RtmpXjz00b/downloaded_packages’
library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
> install.packages("tidyverse")
Installing package into ‘/Users/Manasi/Library/R/3.2/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘knitr’ is not available
also installing the dependencies ‘rmarkdown’, ‘lubridate’, ‘reprex’
There are binary versions available but the source versions are later:
binary source needs_compilation
rmarkdown 1.0 1.16 FALSE
lubridate 1.5.6 1.7.4 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source packages ‘rmarkdown’, ‘lubridate’, ‘reprex’, ‘tidyverse’
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3108k 100 3108k 0 0 776k 0 0:00:04 0:00:04 --:--:-- 776k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 439k 100 439k 0 0 0 0 --: 0 652k 0 --:--:-- --:--:-- --:--:-- 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1027k 17 175k 0 0 27k 100 1027k 0 0 960k 0 0:00:01 0:0-:-- 0:00:1 0:00:--:--:-- 961k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 61647 100 61647 0 0 0359k 0 --:--:-- --:--:-- --:--:--:-- 360k
ERROR: dependency ‘knitr’ is not available for package ‘rmarkdown’
* removing ‘/Users/Manasi/Library/R/3.2/library/rmarkdown’
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
* installing *source* package ‘lubridate’ ...
** package ‘lubridate’ successfully unpacked and MD5 sums checked
** libs
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c RcppExports.cpp -o RcppExports.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [RcppExports.o] Error 127 (ignored)
gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -fPIC -mtune=core2 -g -O2 -c datetime.c -o datetime.o
gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -fPIC -mtune=core2 -g -O2 -c period.c -o period.o
gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -fPIC -mtune=core2 -g -O2 -c tparse.c -o tparse.o
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c update.cpp -o update.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [update.o] Error 127 (ignored)
gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -fPIC -mtune=core2 -g -O2 -c utils.c -o utils.o
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_fixed.cc -o cctz/src/time_zone_fixed.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_fixed.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_if.cc -o cctz/src/time_zone_if.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_if.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_impl.cc -o cctz/src/time_zone_impl.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_impl.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_info.cc -o cctz/src/time_zone_info.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_info.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_libc.cc -o cctz/src/time_zone_libc.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_libc.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_lookup.cc -o cctz/src/time_zone_lookup.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_lookup.o] Error 127 (ignored)
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I/usr/local/include -I"/Users/Manasi/Library/R/3.2/library/Rcpp/include" -c cctz/src/time_zone_posix.cc -o cctz/src/time_zone_posix.o
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [cctz/src/time_zone_posix.o] Error 127 (ignored)
ar rcs libcctz.a ./cctz/src/time_zone_fixed.o ./cctz/src/time_zone_if.o ./cctz/src/time_zone_impl.o ./cctz/src/time_zone_info.o ./cctz/src/time_zone_libc.o ./cctz/src/time_zone_lookup.o ./cctz/src/time_zone_posix.o
ar: ./cctz/src/time_zone_fixed.o: No such file or directory
ar: ./cctz/src/time_zone_if.o: No such file or directory
ar: ./cctz/src/time_zone_impl.o: No such file or directory
ar: ./cctz/src/time_zone_info.o: No such file or directory
ar: ./cctz/src/time_zone_libc.o: No such file or directory
ar: ./cctz/src/time_zone_lookup.o: No such file or directory
ar: ./cctz/src/time_zone_posix.o: No such file or directory
make: *** [libcctz.a] Error 1
ERROR: compilation failed for package ‘lubridate’
* removing ‘/Users/Manasi/Library/R/3.2/library/lubridate’
* restoring previous ‘/Users/Manasi/Library/R/3.2/library/lubridate’
Warning in install.packages :
installation of package ‘lubridate’ had non-zero exit status
ERROR: dependency ‘rmarkdown’ is not available for package ‘reprex’
* removing ‘/Users/Manasi/Library/R/3.2/library/reprex’
Warning in install.packages :
installation of package ‘reprex’ had non-zero exit status
ERROR: dependency ‘reprex’ is not available for package ‘tidyverse’
* removing ‘/Users/Manasi/Library/R/3.2/library/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/gm/fknd6g856231bvh1fd9wmp500000gn/T/RtmplD7mNU/downloaded_packages’
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
The first thing I'm going to advice you is to update your R version, the one you are using is pretty old, the current version is R 3.6.1, usually is easier to install packages on the latest versions.
Also, since you are trying to install packages from source and you are on a Mac system, make sure you have installed/updated xcode in your system
xcode-select --install
Finally, after checking on previous points, try installing again with this command