By PHU
Dear community,
I’m new to DigitalOcean and still lack experience. I set up a Droplet with RStudio on Ubuntu 18.04. To run my code, I need to install the “pcalg” package. However, I always get the following error messsage. Does anyone have an idea how to fix this? Your help would be much appreciated.
> install.packages("pcalg")
Installing package into ‘/home/paul/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘graph’, ‘RBGL’ are not available
also installing the dependencies ‘V8’, ‘dagitty’
trying URL 'https://cloud.r-project.org/src/contrib/V8_2.3.tar.gz'
Content type 'application/x-gzip' length 304765 bytes (297 KB)
==================================================
downloaded 297 KB
trying URL 'https://cloud.r-project.org/src/contrib/dagitty_0.2-2.tar.gz'
Content type 'application/x-gzip' length 168082 bytes (164 KB)
==================================================
downloaded 164 KB
trying URL 'https://cloud.r-project.org/src/contrib/pcalg_2.6-2.tar.gz'
Content type 'application/x-gzip' length 4859003 bytes (4.6 MB)
==================================================
downloaded 4.6 MB
* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=-I/usr/include/v8 -I/usr/include/v8-3.14
Using PKG_LIBS=-lv8 -lv8_libplatform
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because was not found. Try installing:
* deb: libv8-dev or libnode-dev (Debian / Ubuntu)
* rpm: v8-devel (Fedora, EPEL)
* brew: v8 (OSX)
* csw: libv8_dev (Solaris)
To use a custom libv8, set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘V8’
* removing ‘/home/paul/R/x86_64-pc-linux-gnu-library/3.6/V8’
Warning in install.packages :
installation of package ‘V8’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘dagitty’
* removing ‘/home/paul/R/x86_64-pc-linux-gnu-library/3.6/dagitty’
Warning in install.packages :
installation of package ‘dagitty’ had non-zero exit status
ERROR: dependencies ‘graph’, ‘RBGL’, ‘dagitty’ are not available for package ‘pcalg’
* removing ‘/home/paul/R/x86_64-pc-linux-gnu-library/3.6/pcalg’
Warning in install.packages :
installation of package ‘pcalg’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpQLGKab/downloaded_packages’
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
in case anyone stumbles upon this, The error message indicates there are missing required dependencies tgraph’, ‘RBGL’, ‘dagitty’ and the system library ‘libv8-dev’ for the ‘pcalg’ package.
The ‘graph’ and ‘RBGL’ packages are part of Bioconductor, not CRAN, so you have to use the BiocManager package to install them. The ‘dagitty’ package depends on ‘V8’, and ‘V8’ needs the system library ‘libv8-dev’ to be installed. This is why the ‘V8’ package is failing to install.
To fix this issue, you should first install the system package ‘libv8-dev’ using the command below:
sudo apt-get install -y libv8-dev
Next, install the BiocManager package and then use it to install ‘graph’ and ‘RBGL’:
install.packages("BiocManager")
BiocManager::install(c("graph", "RBGL"))
Finally, you should be able to install ‘pcalg’ without issues:
install.packages("pcalg")
Please note that the error message indicated ‘libv8-dev’ or ‘libnode-dev’ could be installed. In this case, ‘libv8-dev’ was suggested, but if it does not work, you can try to install ‘libnode-dev’ instead:
sudo apt-get install -y libnode-dev
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.