0

Why there are errors below installing shiny in Ubuntu 19.04?

> install.packages("shiny")
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘httpuv’

trying URL 'https://cloud.r-project.org/src/contrib/httpuv_1.5.1.tar.gz'
Content type 'application/x-gzip' length 1758514 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

trying URL 'https://cloud.r-project.org/src/contrib/shiny_1.3.2.tar.gz'
Content type 'application/x-gzip' length 2991469 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

* installing *source* package ‘httpuv’ ...
** package ‘httpuv’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -Ilibuv/include -pthread -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/later/include"  -fvisibility=hidden -DSTRICT_R_HEADERS -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V0XiTa/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports-legacy.cpp -o RcppExports-legacy.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -Ilibuv/include -pthread -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/later/include"  -fvisibility=hidden -DSTRICT_R_HEADERS -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V0XiTa/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -Ilibuv/include -pthread -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/later/include"  -fvisibility=hidden -DSTRICT_R_HEADERS -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V0XiTa/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c callback.cpp -o callback.o
In file included from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/bind/mem_fn.hpp:25,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/mem_fn.hpp:22,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function.hpp:30,
                 from callback.h:4,
                 from callback.cpp:1:
/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/8/memory:80,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/function_base.hpp:16,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/detail/prologue.hpp:17,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function.hpp:30,
                 from callback.h:4,
                 from callback.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h:53:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -Ilibuv/include -pthread -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/later/include"  -fvisibility=hidden -DSTRICT_R_HEADERS -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V0XiTa/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c callbackqueue.cpp -o callbackqueue.o
In file included from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/bind/mem_fn.hpp:25,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/mem_fn.hpp:22,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function.hpp:30,
                 from callbackqueue.h:5,
                 from callbackqueue.cpp:1:
/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/8/memory:80,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/function_base.hpp:16,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function/detail/prologue.hpp:17,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/function.hpp:30,
                 from callbackqueue.h:5,
                 from callbackqueue.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h:53:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -Ilibuv/include -pthread -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include" -I"/home/lau/R/x86_64-pc-linux-gnu-library/3.6/later/include"  -fvisibility=hidden -DSTRICT_R_HEADERS -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V0XiTa/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c filedatasource-unix.cpp -o filedatasource-unix.o
In file included from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/smart_ptr/shared_ptr.hpp:28,
                 from /home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/shared_ptr.hpp:17,
                 from uvutil.h:7,
                 from filedatasource.h:4,
                 from filedatasource-unix.cpp:3:
/home/lau/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/smart_ptr/detail/shared_count.hpp:355:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
...
...

I had to cancel the installation, otherwise the errors (or warnings) such as above will keep going on and on.

Any ideas?

I have installed R 3.6.1 in my machine:

$ sudo -i R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Jaap
  • 81,064
  • 34
  • 182
  • 193
Run
  • 54,938
  • 169
  • 450
  • 748
  • Where are the errors? I often see lots of warnings and notes when compiling packages, this does not seem alarming. I see notes and warnings, but nothing out of the ordinary. – r2evans Aug 30 '19 at 13:55
  • @r2evans these warnings will keep going on and never stops. – Run Aug 30 '19 at 13:58
  • But it is progressing, right? Each time it's on a different file. Is there something about the warning that you *know* is problematic and prone to fail? Does it ever fail, or did you stop it before it could (potentially) complete? – r2evans Aug 30 '19 at 14:01
  • @r2evans this never happened before – Run Aug 30 '19 at 14:02
  • Ok, but still the output you show here is not abnormal in my experience. It may take a while to compile, sure, but I see nothing "wrong" (yet). – r2evans Aug 30 '19 at 14:05
  • 1
    @r2evans let me try it again and let u know. thanks. it is just odd – Run Aug 30 '19 at 14:06
  • 1
    @r2evans oh yea. it's fine after re-installing r-base in my local machine – Run Aug 30 '19 at 14:08
  • 1
    You might not have enough RAM, I had something similar with a virtual machines on AWS and Google. Try installing from source – Pork Chop Sep 02 '19 at 11:29

1 Answers1

0

I ran into the same issue using Ubuntu 20.04 server on AWS. As mentioned by @Pork Chop, this seems to be a RAM issue.

If increasing RAM is not an option, adding swap space as described in this post worked for me.

Paulo
  • 89
  • 2