stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 269 forks source link

Trouble installing rstan on Ubuntu 18.04 #863

Closed tylersimko closed 4 years ago

tylersimko commented 4 years ago

Summary:

Please provide a short summary (no more than a sentence or two).

Hi everyone, I'm trying to install rstan on Ubuntu 18.04 to use for a Gradescope autograder. The rstan install seems to be failing because of two dependencies (r-cran-v8 and libnode64) and I'm not sure what is going wrong. I'm new to all of this, so I definitely might be missing something basic.

Reproducible Steps:

Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.

add-apt-repository --enable-source --yes "ppa:marutter/rrutter4.0"

add-apt-repository --enable-source --yes "ppa:c2d4u.team/c2d4u4.0+"

apt-get install -y r-cran-rstan

Current Output:

If applicable, any relevant output from RStan.

root:/autograder# apt-get install -y r-cran-rstan
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-rstan : Depends: r-cran-v8 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root:/autograder# apt-get install -y r-cran-v8   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-v8 : Depends: libnode64 but it is not installable
E: Unable to correct problems, you have held broken packages.

Expected Output:

If applicable, the output you expected from RStan.

R Version:

The version of R you are running (e.g., from R.version.string)

4.0.2

Operating System:

Your operating system (e.g., OS X 10.11.3)

Ubuntu 18.04

jgabry commented 4 years ago

Sorry you're running into installation trouble. I don't use linux much, so I don't really know what I'm talking about, but I wonder if you can install libnode64 separately first.

@bgoodri @SteveBronder or someone else on linux do you have any suggestions?

tylersimko commented 4 years ago

Thanks so much for your advice @jgabry! I don't really know what I'm talking about with linux either, so no worries at all. I've tried finding and installing libnode64 (with apt-get install libnode64 ) separately without any luck so far.

bgoodri commented 4 years ago

Do apt-get install r-cran-v8

On Wed, Oct 21, 2020 at 5:59 PM Tyler Simko notifications@github.com wrote:

Thanks so much for your advice @jgabry https://github.com/jgabry! I don't really know what I'm talking about with linux either, so no worries at all. I've tried finding and installing libnode64 (with apt-get install libnode64 ) separately without any luck so far.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/863#issuecomment-713901433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKXSNY6U3WPYOYHQDMDSL5KVLANCNFSM4SZ4NETQ .

tylersimko commented 4 years ago

Thanks @bgoodri ! That also fails because of libnode64, which I haven't gotten to work yet. I've tried adding various sources to get libnode64 to install and apt-get update afterwards, but can't seem to find where or what that package is. But I have very little experience with linux, so I may just be doing making a simple mistake.

root:/autograder# apt-get install r-cran-v8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-v8 : Depends: libnode64 but it is not installable
E: Unable to correct problems, you have held broken packages.

root:/autograder# apt-get install libnode64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libnode64 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libnode64' has no installation candidate
bgoodri commented 4 years ago

try https://github.com/jeroen/v8#backports-for-xenial-and-bionic

On Wed, Oct 21, 2020 at 6:24 PM Tyler Simko notifications@github.com wrote:

Thanks @bgoodri https://github.com/bgoodri ! That also fails because of libnode64, which I haven't gotten to work yet.

root:/autograder# apt-get install r-cran-v8 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: r-cran-v8 : Depends: libnode64 but it is not installable E: Unable to correct problems, you have held broken packages.

root:/autograder# apt-get install libnode64 Reading package lists... Done Building dependency tree Reading state information... Done Package libnode64 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libnode64' has no installation candidate

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/863#issuecomment-713911597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKUWISMSKYZLYV3326DSL5NTDANCNFSM4SZ4NETQ .

tylersimko commented 4 years ago

@bgoodri That worked! Thank you so much for your help!!

Based on that link, it sounds like the problem was an outdated V8 engine on 18.04. Adding these lines to update did the trick:

add-apt-repository ppa:cran/v8
apt-get update
apt-get install libnode-dev

Thanks again! I'll close the issue now.

jgabry commented 4 years ago

@tylersimko Great, glad it's working for you now. And thanks @bgoodri.

jeroen commented 3 years ago

As of V8 version 3.4.0 (on CRAN now) you can now also install V8 on any 64-bit Linux like this:

Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1)
install.packages("V8")
jgabry commented 3 years ago

Thanks @jeroen!