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

Additional linux dependency: v8 #65

Closed
hansthompson opened this issue Oct 13, 2015 · 14 comments
Closed

Additional linux dependency: v8 #65

hansthompson opened this issue Oct 13, 2015 · 14 comments

Comments

@hansthompson
Copy link

Hi. I love all your work and this package is great.

I tried installing this package on ubuntu and it is asking me for v8.

> install.packages("geojsonio")
Installing package into ‘/home/ht/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘V8’

trying URL 'https://cran.rstudio.com/src/contrib/V8_0.8.tar.gz'
Content type 'application/x-gzip' length 111572 bytes (108 KB)
==================================================
downloaded 108 KB

trying URL 'https://cran.rstudio.com/src/contrib/geojsonio_0.1.4.tar.gz'
Content type 'application/x-gzip' length 2898101 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
Package libv8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libv8.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libv8' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lv8
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libv8 was not found. Try installing:
 * deb: libv8-3.14-dev | libv8-dev (Debian, Ubuntu)
 * rpm: v8-devel (Fedora, EPEL)
 * brew: v8-315 (OSX) -- NOT regular v8! Tap from homebrew/versions
 * csw: libv8_dev (Solaris)
If libv8 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libv8.pc file. If pkg-config
is unavailable you can 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/ht/R/x86_64-pc-linux-gnu-library/3.2/V8’
Warning in install.packages :
  installation of package ‘V8’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘geojsonio’
* removing ‘/home/ht/R/x86_64-pc-linux-gnu-library/3.2/geojsonio’
Warning in install.packages :
  installation of package ‘geojsonio’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmporI7r9/downloaded_packages’

I installed libv8-dev and it worked fine. I'm not even sure if this is an issue as it is listed in the error message to install it.

@sckott
Copy link
Collaborator

sckott commented Oct 13, 2015

hi @hansthompson thanks for the kind words 😸

Right, libv8 is required, and there's not really a machine actionable way to make that install in R that I know of.

@jeroenooms do you think I should have the line you have in SysReq's https://github.com/jeroenooms/V8/blob/master/DESCRIPTION#L15 in this pkg (and others that import the V8 R client)

@jeroen
Copy link
Member

jeroen commented Oct 13, 2015

No that makes no sense, libv8 is a dependency of v8. You shouldn't list recursive dependencies in your description, that would be silly :) From what I read above everything did exactly what it needed to do. geojsonio depends on v8, which kindly explained the user that libv8 is required on linux.

@sckott
Copy link
Collaborator

sckott commented Oct 13, 2015

thanks for your help

@sckott
Copy link
Collaborator

sckott commented Oct 13, 2015

thanks @hansthompson - looks like there's nothing to change in the package, but thanks for dropping in - and let me know of any further issues

@sckott sckott closed this as completed Oct 13, 2015
@kshll6
Copy link

kshll6 commented Apr 11, 2016

I had some sort of a similar problem. I tried installing 'geojsonio' for R on ubuntu, and it said I needed to install 'ibv8-3.14-dev' or 'libv8-dev'. Howeverm, when I install either of the two, I get the following error message:
"Warning in install.packages : package ‘libv8-dev’ is not available (for R version 3.2.2)"

Does anyone have a solution for this?

@ateucher
Copy link
Member

@kshll6 libv8 is a system dependency for the V8 R package, which geojsonio depends on. You'll need to install libv8 on your system by running sudo apt-get install libv8-dev in your terminal.

@paternogbc
Copy link

Thanks a lot @ateucher!

@Bio-designer
Copy link

I got the following error:

/usr/bin/ld: cannot find -lv8
collect2: error: ld returned 1 exit status
make: *** [V8.so] Error 1
ERROR: compilation failed for package ‘V8’

when I use
R CMD INSTALL V8_1.5.tar.gz
--configure-vars='INCLUDE_DIR=... LIB_DIR=...'

I am stuck now.

@sckott
Copy link
Collaborator

sckott commented Nov 26, 2018

@Bio-designer what operating system are you on? and did you install the v8 system library https://github.com/jeroen/V8#installation ?

@florianm
Copy link

After upgrading to Ubuntu to 19.10 "Effin' Eoan", geojsonio functions failed with ibv8.so.3.14.5: cannot open shared object file. This was fixed by re-installing R pkg V8. Blood, sweat, tears, and solution in details.

geojsonio can't find libv8.so

areas_sf <- geojsonio::as.json(area_records$features) %>% geojsonsf::geojson_sf()
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/florian/R/x86_64-pc-linux-gnu-library/3.6/V8/libs/V8.so':
  libv8.so.3.14.5: cannot open shared object file: No such file or directory

Attempting re-installing geojsonio

> install.packages("geojsonio")
Installing package into ‘/home/florian/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/geojsonio_0.8.0.tar.gz'
Content type 'application/x-gzip' length 1974552 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

* installing *source* package ‘geojsonio’ ...
** package ‘geojsonio’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/florian/R/x86_64-pc-linux-gnu-library/3.6/V8/libs/V8.so':
  libv8.so.3.14.5: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted

(buzzer sound)

Attempting re-installing system package libv8-dev

$ sudo apt install libv8-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libnode-dev' instead of 'libv8-dev'
libnode-dev is already the newest version (10.15.2~dfsg-2ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

So libnode-dev is the new libv8-dev. Not sure whether R pkg V8 knows that.

geojsonio installation still broken

> install.packages("geojsonio")
Installing package into ‘/home/florian/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/geojsonio_0.8.0.tar.gz'
Content type 'application/x-gzip' length 1974552 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

* installing *source* package ‘geojsonio’ ...
** package ‘geojsonio’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/florian/R/x86_64-pc-linux-gnu-library/3.6/V8/libs/V8.so':
  libv8.so.3.14.5: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted

Solution: re-install R pkg V8

install.packages("V8")

Now, without re-installing geojsonio, geojsonio works again. Phew!

System info

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:        19.10
Codename:      effin eoan

Sessioninfo

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 19.10

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C               LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8     LC_MONETARY=en_AU.UTF-8   
 [6] LC_MESSAGES=en_AU.UTF-8    LC_PAPER=en_AU.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ggplot2_3.2.1      DT_0.10            listviewer_3.0.0   lubridate_1.7.4    leaflet_2.0.2      skimr_1.0.7        magrittr_1.5      
 [8] tidyr_1.0.0        dplyr_0.8.3        wastdr_0.1.22      usethis_1.5.1.9000

loaded via a namespace (and not attached):
 [1] httr_1.4.1           jsonlite_1.6         shiny_1.4.0          assertthat_0.2.1     sp_1.3-2             pillar_1.4.2         backports_1.1.5     
 [8] lattice_0.20-38      glue_1.3.1           digest_0.6.22        promises_1.1.0       snakecase_0.11.0     colorspace_1.4-1     htmltools_0.4.0     
[15] httpuv_1.5.2         pkgconfig_2.0.3      purrr_0.3.3          xtable_1.8-4         scales_1.0.0         later_1.0.0          tibble_2.1.3        
[22] geojsonio_0.8.0      withr_2.1.2          janitor_1.2.0        lazyeval_0.2.2       crayon_1.3.4         mime_0.7             maptools_0.9-8      
[29] fs_1.3.1             foreign_0.8-72       class_7.3-15         geojsonsf_1.3.0      tools_3.6.1          geojson_0.3.2.9100   lifecycle_0.1.0.9000
[36] stringr_1.4.0        V8_2.3               munsell_0.5.0        packrat_0.5.0        e1071_1.7-2          compiler_3.6.1       jqr_1.1.0           
[43] rlang_0.4.1          units_0.6-5          classInt_0.4-2       grid_3.6.1           rstudioapi_0.10      htmlwidgets_1.5.1    crosstalk_1.0.0     
[50] gtable_0.3.0         DBI_1.0.0            curl_4.2             R6_2.4.1             rgdal_1.4-7          knitr_1.26           fastmap_1.0.1       
[57] rgeos_0.5-2          zeallot_0.1.0        KernSmooth_2.23-16   stringi_1.4.3        Rcpp_1.0.3           sf_0.8-0             vctrs_0.2.0.9007    
[64] tidyselect_0.2.5     xfun_0.11  

@sckott
Copy link
Collaborator

sckott commented Nov 21, 2019

thanks @florianm ! for the details, i''m sure this will come in handy for many folks

@jannes-m
Copy link

jannes-m commented Mar 3, 2021

After adding the v8 ppa repository, I additionally needed to purge the libv8-3.14.5 package to make V8 work again

sudo add-apt-repository ppa:cran/v8
apt update
apt install libnode-dev
apt purge libv8-3.14.5
# reinstall V8
R -e 'install.packages("V8")'

@sckott
Copy link
Collaborator

sckott commented Mar 3, 2021

thanks @jannes-m for sharing your solution

@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants