Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when install packages rstan #304

Closed
sproblvem opened this issue Jun 24, 2016 · 3 comments
Closed

Failed when install packages rstan #304

sproblvem opened this issue Jun 24, 2016 · 3 comments

Comments

@sproblvem
Copy link

sproblvem commented Jun 24, 2016

Summary:

Try to install rstan on Kubuntu 16.04 but failed, following the official guide step by step.

Description:

I follow this guide try to install rstan on my Kubuntu 16.04.
install R

sudo apt-get install r-base

configure
my g++ version is -

g++ (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

so I use the following configuration

cat("\nCXXFLAGS+=-flto -ffat-lto-objects -Wno-unused-local-typedefs",
file = M, sep = "\n", append = TRUE)

install package

First I tryied

install.packages('rstan', repos = 'https://cloud.r-project.org/', dependencies = TRUE)

It failed, but not because of https
then I try

install.packages("rstan", type = "source")

It also failed

Current Output:

In file included from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/type_traits/detail/bool_trait_def.hpp:21:0,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/is_dereferenceable.hpp:12,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/resolve.hpp:26,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/push.hpp:24,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:31,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/stream_buffer.hpp:22,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/stream.hpp:21,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream/stream.hpp:16,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream.hpp:15,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi.hpp:30,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/include/qi.hpp:16,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar.hpp:4,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_def.hpp:4,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_inst.cpp:1,
from lang__grammars__whitespace_grammar_inst.cpp:19:
/home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/type_traits/detail/template_arity_spec.hpp:13:84: note: #pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated

pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")

                                                                                ^

In file included from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/is_dereferenceable.hpp:13:0,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/resolve.hpp:26,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/push.hpp:24,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:31,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/stream_buffer.hpp:22,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/iostreams/stream.hpp:21,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream/stream.hpp:16,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi/stream.hpp:15,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/home/qi.hpp:30,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/spirit/include/qi.hpp:16,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar.hpp:4,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_def.hpp:4,
from /home/yama/R/x86_64-pc-linux-gnu-library/3.2/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_inst.cpp:1,
from lang__grammars__whitespace_grammar_inst.cpp:19:
/home/yama/R/x86_64-pc-linux-gnu-library/3.2/BH/include/boost/type_traits/detail/template_arity_spec.hpp:13:84: note: #pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated

pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")

                                                                                ^

/usr/lib/R/etc/Makeconf:143: recipe for target 'lang__grammars__term_grammar_inst.o' failed
make: *** [lang__grammars__term_grammar_inst.o] Error 1
make: *** Waiting for unfinished jobs....
ERROR: compilation failed for package ‘rstan’

  • removing ‘/home/yama/R/x86_64-pc-linux-gnu-library/3.2/rstan’

The downloaded source packages are in
‘/tmp/Rtmp8IyAj8/downloaded_packages’
Warning message:
In install.packages("rstan", type = "source") :
installation of package ‘rstan’ had non-zero exit status

R Version:

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

Operating System:

Linux nuc 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

@bgoodri
Copy link
Contributor

bgoodri commented Jun 24, 2016

This was most likely just a temporary thing due to StanHeaders being ahead of rstan on CRAN. You can install rstan now if you use a mirror that has version 2.10.1.

@sproblvem
Copy link
Author

Hi bgoodri, thank you for your reply!
But I am a newbie of R and stan, I am not very understand your solution.
How to set the mirror which has version 2.10.1?
add a version option in "install.packages("rstan", type = "source")"?
Thank you!

@bgoodri
Copy link
Contributor

bgoodri commented Jun 25, 2016

install.packages("rstan", repos = "https://cran.r-project.org",
dependencies = TRUE)

should do it.

Closes #304

On Sat, Jun 25, 2016 at 2:05 AM, sproblvem notifications@github.com wrote:

Hi bgoodri, thank you for your reply!
But I am a newbie of R and stan, I am not very understand your solution.
How to set the mirror which has version 2.10.1?
add a version option in "install.packages("rstan", type = "source")"?
Thank you!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#304 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ADOrqgo3jBQdQt6NGGOpWI5xdCJuzaEzks5qPMU4gaJpZM4I9f8a
.

@bgoodri bgoodri closed this as completed Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants