Reputation: 21322
I'm trying to install packages on CentOs hosted RStudio. Initially the console output told me to install some packages, including libcurl-devel or libxml2-devel which I did using yum install.
I'm able to install some packages. However, tidyverse is giving me some issues. I cannot make sense of the console output after attempting to install so I'll just paste it below. Can anyone advise on how to overcome this so that I can install tidyverse?
install.packages("tidyverse", dependencies = T)
Installing package into ‘/home/rstudio/mylibs’
(as ‘lib’ is unspecified)
also installing the dependency ‘lubridate’
trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.7.4.tar.gz'
Content type 'application/x-gzip' length 449850 bytes (439 KB)
==================================================
downloaded 439 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB
* installing *source* package ‘lubridate’ ...
** package ‘lubridate’ successfully unpacked and MD5 sums checked
** libs
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/home/rstudio/mylibs/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/home/rstudio/mylibs/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c datetime.c -o datetime.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/home/rstudio/mylibs/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c period.c -o period.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/home/rstudio/mylibs/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c tparse.c -o tparse.o
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/home/rstudio/mylibs/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c update.cpp -o update.o
In file included from ./cctz/include/civil_time.h:18,
from update.cpp:4:
./cctz/include/civil_time_detail.h:37: error: expected nested-name-specifier before ‘year_t’
./cctz/include/civil_time_detail.h:37: error: ‘year_t’ has not been declared
./cctz/include/civil_time_detail.h:37: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:37: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:41: error: expected nested-name-specifier before ‘diff_t’
./cctz/include/civil_time_detail.h:41: error: ‘diff_t’ has not been declared
./cctz/include/civil_time_detail.h:41: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:41: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:46: error: expected nested-name-specifier before ‘month_t’
./cctz/include/civil_time_detail.h:46: error: ‘month_t’ has not been declared
./cctz/include/civil_time_detail.h:46: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:46: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:47: error: expected nested-name-specifier before ‘day_t’
./cctz/include/civil_time_detail.h:47: error: ‘day_t’ has not been declared
./cctz/include/civil_time_detail.h:47: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:47: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:48: error: expected nested-name-specifier before ‘hour_t’
./cctz/include/civil_time_detail.h:48: error: ‘hour_t’ has not been declared
./cctz/include/civil_time_detail.h:48: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:48: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:49: error: expected nested-name-specifier before ‘minute_t’
./cctz/include/civil_time_detail.h:49: error: ‘minute_t’ has not been declared
./cctz/include/civil_time_detail.h:49: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:49: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:50: error: expected nested-name-specifier before ‘second_t’
./cctz/include/civil_time_detail.h:50: error: ‘second_t’ has not been declared
./cctz/include/civil_time_detail.h:50: error: expected ‘;’ before ‘=’ token
./cctz/include/civil_time_detail.h:50: error: expected unqualified-id before ‘=’ token
./cctz/include/civil_time_detail.h:54: error: expected ‘)’ before ‘year’
./cctz/include/civil_time_detail.h:78: error: ‘cctz::detail::impl::is_leap_year’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:78: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:78: error: expected ‘,’ or ‘;’ before ‘noexcept’
./cctz/include/civil_time_detail.h:81: error: ‘cctz::detail::impl::year_index’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:81: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:81: error: ‘month_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:81: error: initializer expression list treated as compound expression
./cctz/include/civil_time_detail.h:81: error: expected ‘,’ or ‘;’ before ‘noexcept’
./cctz/include/civil_time_detail.h:84: error: ‘cctz::detail::impl::days_per_century’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:84: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:84: error: ‘month_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:84: error: initializer expression list treated as compound expression
./cctz/include/civil_time_detail.h:84: error: expected ‘,’ or ‘;’ before ‘noexcept’
./cctz/include/civil_time_detail.h:88: error: ‘cctz::detail::impl::days_per_4years’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:88: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:88: error: ‘month_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:88: error: initializer expression list treated as compound expression
./cctz/include/civil_time_detail.h:88: error: expected ‘,’ or ‘;’ before ‘noexcept’
./cctz/include/civil_time_detail.h:92: error: ‘cctz::detail::impl::days_per_year’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:92: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:92: error: ‘month_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:92: error: initializer expression list treated as compound expression
./cctz/include/civil_time_detail.h:92: error: expected ‘,’ or ‘;’ before ‘noexcept’
./cctz/include/civil_time_detail.h:95: error: ‘cctz::detail::impl::days_per_month’ declared as an ‘inline’ variable
./cctz/include/civil_time_detail.h:95: error: ‘year_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:95: error: ‘month_t’ was not declared in this scope
./cctz/include/civil_time_detail.h:95: error: initializer expression list treated as compound expression
./cctz/include/civil_time_detail.h:95: error: expected ‘,’ or ‘;’ before ‘noexcept’
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/functional:56,
from /home/rstudio/mylibs/Rcpp/include/RcppCommon.h:61,
from /home/rstudio/mylibs/Rcpp/include/Rcpp.h:27,
from update.cpp:7:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/typeinfo:36: error: expected ‘}’ before end of line
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/typeinfo:36: error: expected ‘}’ before end of line
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/typeinfo:36: error: expected ‘}’ before end of line
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/typeinfo:36: error: expected declaration before end of line
make: *** [update.o] Error 1
ERROR: compilation failed for package ‘lubridate’
* removing ‘/home/rstudio/mylibs/lubridate’
Warning in install.packages :
installation of package ‘lubridate’ had non-zero exit status
ERROR: dependency ‘lubridate’ is not available for package ‘tidyverse’
* removing ‘/home/rstudio/mylibs/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp0Wx5ys/downloaded_packages’
Upvotes: 0
Views: 1319
Reputation: 21322
Based on the comments this issue seems to be more to do with CentOs6 rather than R or Tidyverse. I installed an older version of lubridate which seemed to be having trouble installing as part of tidyverse package:
devtools::install_github("tidyverse/lubridate@before-CCTZ")
I tried to install tidyverse after installing this older version of lubridate but failed with similar error messages.
I then installed an older version of tidyverse which then successfully installed:
devtools::install_version("tidyverse", version = "1.1.1", repos = "http://cran.us.r-project.org")
Upvotes: 1