Package installation "tabulizer" error in R

Asked

Viewed 211 times

1

I’m trying to install the package tabulizer in R and I’m not getting it. I also tried downloading directly from CRAN, but it also didn’t work. I also tried installing the tabulizerjars separately but also failed to succeed.

========================================================
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

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

locale:
 [1] LC_CTYPE=pt_BR.UTF-8       LC_NUMERIC=C               LC_TIME=pt_BR.UTF-8       
 [4] LC_COLLATE=pt_BR.UTF-8     LC_MONETARY=pt_BR.UTF-8    LC_MESSAGES=pt_BR.UTF-8   
 [7] LC_PAPER=pt_BR.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] devtools_2.1.0 usethis_1.5.1 

=======================================================================
> # Instala pacote extrai tabela de pdf
> install.packages("tabulizer", dependencies = TRUE)
Installing package into ‘/home/jairo/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘tabulizerjars’

tentando a URL 'https://cloud.r-project.org/src/contrib/tabulizerjars_1.0.1.tar.gz'
Content type 'application/x-gzip' length 10902674 bytes (10.4 MB)
==================================================
downloaded 10.4 MB

tentando a URL 'https://cloud.r-project.org/src/contrib/tabulizer_0.2.2.tar.gz'
Content type 'application/x-gzip' length 1047758 bytes (1023 KB)
==================================================
downloaded 1023 KB

* installing source package ‘tabulizerjars’ ...
** package ‘tabulizerjars’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
* installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘tabulizerjars’:
 .onLoad failed in loadNamespace() for 'tabulizerjars', details:
  call: NULL
  error: .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: impossível carregar objeto compartilhado '/usr/lib/R/site-library/rJava/libs/rJava.so':
  libjvm.so: não é possível abrir arquivo compartilhado: Arquivo ou diretório inexistente
Erro: loading failed
Execução interrompida
ERROR: loading failed
* removing ‘/home/jairo/R/x86_64-pc-linux-gnu-library/3.4/tabulizerjars’
Warning in install.packages :
  installation of package ‘tabulizerjars’ had non-zero exit status
ERROR: dependency ‘tabulizerjars’ is not available for package ‘tabulizer’
* removing ‘/home/jairo/R/x86_64-pc-linux-gnu-library/3.4/tabulizer’
Warning in install.packages :
  installation of package ‘tabulizer’ had non-zero exit status

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

1 answer

1

I had a little episode to install this package on my computer. First I updated my java. Then I had to install the package rJava. To install the tabulizer I went straight to R, without using the IDE (I use Rstudio) and initialized as administrator. Only then I used the install.packages("tabulizer", dependencies = TRUE).

I do not know exactly how it would be in your case, because you use an operating system different from mine, but I left the step by step of what I did, because it can serve as guidance for you adapt to your situation.

  • I updated Java, but in the installation of rJava it was already an error... checking whether Java run-time Works... . /configure: line 3766: /usr/lib/jvm/default-java/jre/bin/java: No such file or directory no configure: error: Java interpreter '/usr/lib/jvm/default-java/jre/bin/java' does not work ERROR: Configuration failed for package +rJava'

  • It seems to me that he is not finding the java on his machine, or does not have privilege to access it. Review the user privileges that are trying to install the package.

  • I was already with the privileges... I couldn’t even. I don’t really know how to solve it. But thank you so much for the help and support.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.