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

Cannot install V8 without internet access #140

Open
howff opened this issue Mar 3, 2022 · 5 comments
Open

Cannot install V8 without internet access #140

howff opened this issue Mar 3, 2022 · 5 comments

Comments

@howff
Copy link

howff commented Mar 3, 2022

The installation of V8 fails on linux when you have no internet access. You can sudo apt-get install libv8-dev beforehand but it still fails. You can set DOWNLOAD_STATIC_LIBV8=0 and it still fails. You can manually download a package by trying to decode the get-v8-linux.sh script but it's not documented how to install it and it probably won't install due to #122.

@jeroen
Copy link
Owner

jeroen commented Mar 3, 2022

It should absolutely work if you have libv8-dev installed; that is how all the debian/ubuntu packages are built. Which linux distro and version are you using? Can you please include an install log.

@howff
Copy link
Author

howff commented Mar 3, 2022

Thanks for the quick reply. This is what happened:

$ sudo apt install libv8-dev
Note, selecting 'libnode-dev' instead of 'libv8-dev'
The following NEW packages will be installed:
  libnode-dev libnode64 libssl-dev libuv1-dev
...
$ R
R version 4.1.1 (2021-08-10) -- "Kick Things"
> install.packages('V8')
Content type 'application/x-gzip' length 681018 bytes (665 KB)
* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
** using staged installation
Found C++14 compiler: x86_64-conda-linux-gnu-c++
> curl::curl_download("http://jeroen.github.io/V8/get-v8-linux.sh","get-v8-linux.sh")
>
>
./configure: 2: ./get-v8-linux.sh: Syntax error: newline unexpected
ERROR: configuration failed for package ‘V8’

(the deb and CRAN packages come from local mirror, the curl download fails due to no internet, and the Syntax error is a red herring)

@jeroen
Copy link
Owner

jeroen commented Mar 3, 2022

OK I'll try this again myself, it should just fall through if the download script fails.
A workaround is to install while setting an envvvar DISABLE_STATIC_LIBV8=1.
But if you're using anaconda you should probably install r-v8 from anaconda: https://anaconda.org/conda-forge/r-v8

@howff
Copy link
Author

howff commented Mar 3, 2022

Thanks. (I did test with that env var as well, same result)

@ARawles
Copy link

ARawles commented Nov 28, 2022

I've come across the same problem and found that setting the DISABLE_STATIC_LIBV8 environmental variable does work, but if you have the DOWNLOAD_STATIC_LIBV8 variable set to any value, then it will still try to use the get-v8-linux.sh approach.

In other words:
DOWNLOAD_STATIC_LIBV8=0
DISABLE_STATIC_LIBV8=1
OR
DOWNLOAD_STATIC_LIBV8=1
DISABLE_STATIC_LIBV8=1
will both try and download the .sh file.

Only DISABLE_STATIC_LIBV8=1 and DOWNLOAD_STATIC_LIBV8 being unset will properly install without internet connectivity.

I'm not sure if this is the desired behaviour (i.e., setting any value for the variables is treated essentially as TRUE) or not, but I thought I'd mention it.

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

3 participants