带有R 3.6的Ubuntu 19.04-无法安装R Shiny软件包?

时间:2019-08-30 13:47:03

标签: r shiny ubuntu-19.04 r-base

为什么在Ubuntu 19.04中安装Shiny下面有错误?

> 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() ) )
...
...

我必须取消安装,否则上述错误(或警告)将一直持续下去。

有什么想法吗?

我已经在计算机上安装了R 3.6.1:

$ 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)

1 个答案:

答案 0 :(得分:0)

我在AWS上使用Ubuntu 20.04服务器遇到了同样的问题。如@Pork Chop所述,这似乎是RAM问题。

如果不能选择增加RAM,则按本post中所述添加交换空间对我来说是有效的。