Ubuntu 19.04 with R 3.6 - can't install R Shiny package?

对着背影说爱祢 提交于 2020-08-11 02:18:52

问题


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)

来源:https://stackoverflow.com/questions/57727987/ubuntu-19-04-with-r-3-6-cant-install-r-shiny-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!