I have an unexpected issue installing v8
package in a new version of R 4.5under Ubuntu 22.04. This the output of running an install.packages()
command in R:
I think I tried all possible options of installing the package after I upgraded to a new version of R 4.5 two days ago. In every way I kept getting the same error message.
I did what it said and installed additional package for Ubuntu (libnode-dev), but it didn't help.
I also followed instructions in this post (Not able to install V8 package on ubuntu?), although, I understand this is a little bit a different story.
It seems to me that it has smth to do with C++ compiler, but due to insufficient knowledge in this area I think I won't be able to solve the issue without breaking anything else.
I would appreciate inputs from the community.
The v8 package is in the distribution, albeit in an older version, so you can just say sudo apt install r-cran-v8
to get a binary.
If you opt into r2u then you get the current CRAN package as a binary -- along with 22k other CRAN binaries.
apt-cache
can show us the versions when the r2u repo is enabled:
root:/# apt-cache policy r-cran-v8
r-cran-v8:
Installed: (none)
Candidate: 6.0.3-1.ca2204.1
Version table:
6.0.3-1.ca2204.1 700
700 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 Packages
4.1.0+dfsg-1 500
500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
root:/# `
Installation is easy and thanks to bspm
accessible from install.packages()
, bringing in all dependencies too:
root:/# Rscript -e 'install.packages("v8")'
Hit http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
Hit https://r2u.stat.illinois.edu/ubuntu jammy InRelease
Hit http://archive.ubuntu.com/ubuntu jammy InRelease
Hit http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 0 B in 0s (0 B/s)
Install system packages as root...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Get:1 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-curl amd64 6.2.2-1.ca2204.1 [456 kB]
Get:2 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-jsonlite amd64 2.0.0-1.ca2204.1 [634 kB]
Get:3 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-rcpp amd64 1.0.14-1.ca2204.1 [1988 kB]
Get:4 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-v8 amd64 6.0.3-1.ca2204.1 [8506 kB]
Fetched 11.6 MB in 0s (0 B/s)
Selecting previously unselected package r-cran-curl.
(Reading database ... 18557 files and directories currently installed.)
Preparing to unpack .../r-cran-curl_6.2.2-1.ca2204.1_amd64.deb ...
Unpacking r-cran-curl (6.2.2-1.ca2204.1) ...
Selecting previously unselected package r-cran-jsonlite.
Preparing to unpack .../r-cran-jsonlite_2.0.0-1.ca2204.1_amd64.deb ...
Unpacking r-cran-jsonlite (2.0.0-1.ca2204.1) ...
Selecting previously unselected package r-cran-rcpp.
Preparing to unpack .../r-cran-rcpp_1.0.14-1.ca2204.1_amd64.deb ...
Unpacking r-cran-rcpp (1.0.14-1.ca2204.1) ...
Selecting previously unselected package r-cran-v8.
Preparing to unpack .../r-cran-v8_6.0.3-1.ca2204.1_amd64.deb ...
Unpacking r-cran-v8 (6.0.3-1.ca2204.1) ...
Setting up r-cran-rcpp (1.0.14-1.ca2204.1) ...
Setting up r-cran-curl (6.2.2-1.ca2204.1) ...
Setting up r-cran-jsonlite (2.0.0-1.ca2204.1) ...
Setting up r-cran-v8 (6.0.3-1.ca2204.1) ...
root:/#