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

TERR + Debian + Geospatial #28

Open
ismailsunni opened this issue Oct 14, 2019 · 7 comments
Open

TERR + Debian + Geospatial #28

ismailsunni opened this issue Oct 14, 2019 · 7 comments

Comments

@ismailsunni
Copy link
Owner

No description provided.

@ismailsunni
Copy link
Owner Author

Always had a problem with libproj not found on Debian based. Changed to use Ubuntu base image. It works.

@ismailsunni
Copy link
Owner Author

Not able to install rJava. The error message:

checking Java support in R... configure: error: absent
R was configured without Java support. Please run
R CMD javareconf
as root to add Java support to R.

If you do not have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.
* Removing directory 'rJava' from library directory '/home/docker/tibco/site-library' because of installation error
Warning message:
In do.call(what, args, quote, envir) : closing unused connection 3 (https://cloud.r-project.org/src/contrib/Rcpp_1.0.3.tar.gz)
Error in source2binary.configure(sourceDir, binaryDir, pkgName, insta : rJava/configure reported failure
    Cannot install package from /tmp/TERR_15c26b8b45671/source_15c2625558ec8/rJava

Trying to run
R CMD javareconf

Got this error :

Cannot find executable 'javareconf'.

It seems the javareconf is specific to GNU R. Checking the R --help I got this message:

Or: TERR CMD command args

where 'command' is one of
  build                 Build a package
  check                 Run package checks
  INSTALL               Install a package
  Rdconv                Convert Rd files

So, it is indeed no javareconf.

Alternative solutions:

  • Check what R CMD javareconf does, and replicate it
  • Ignore packages that needs rJava

@ismailsunni
Copy link
Owner Author

Failed to install an installed package:

> install.packages('sf')
Trying to download URL 'https://cloud.r-project.org/src/contrib/sf_0.8-0.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/sf_0.8-0.tar.gz'
  Downloaded 8607770 bytes
* unpacking *source* package sf from "/tmp/TERR_00016b8b45671/downloaded_packages/sf_0.8-0.tar.gz" to "/tmp/TERR_00016b8b45671/source_000174b0dc515"
* checking MD5 checksums
    MD5 checksums ok
* installing *source* package from "/tmp/TERR_00016b8b45671/source_000174b0dc515/sf" to "/home/docker/tibco/site-library"
Error in source2binary(dir, install_opts = install_opts) : Cannot rename old binaryDir from '/home/docker/tibco/site-library/sf' to '/home/docker/tibco/site-library/00LOCK--sf'
    Cannot install package from /tmp/TERR_00016b8b45671/source_000174b0dc515/sf

@nuest
Copy link
Contributor

nuest commented Jan 7, 2020

Looking at https://github.com/ismailsunni/dockeRs/blob/master/terr-5.0.0-debian-geospatial/Dockerfile you do not install Java... how should rJava work then?

@ismailsunni
Copy link
Owner Author

Reproducible example of failure in installing an existing package:

docker run  -it --rm ismailsunni/terr-5.0.0-ubuntu-geospatial

It will open a TERR session. Then run this code:

install.packages('RSQLite')

or

install.packages('sf')

It seems, if the package need another R package (dependency) that already installed, it will give the error.

@nuest
Copy link
Contributor

nuest commented Jan 9, 2020

For RSQLite I do get a few warnings, but can load the package:

> library("RSQLite")
The following object(s) are masked _from_ 'package:methods':

    show
Warning messages:
1: In .loadNamespaceImpl(package, path, keep.source, partial) : package 'blob': S3method declaration for 'vec_ptype2.blob' ignored: cannot find generic
2: In .loadNamespaceImpl(package, path, keep.source, partial) : package 'blob': S3method declaration for 'vec_ptype2.list.blob' ignored: cannot find generic

For sf, I get an error, but sf is already installed - why do you need to install it again?

> install.packages("sf")
Trying to download URL 'https://cloud.r-project.org/src/contrib/sf_0.8-0.tar.gz' to file '/tmp/TERR_000e6b8b45671/downloaded_packages/sf_0.8-0.tar.gz'
  Downloaded 8607770 bytes
* unpacking *source* package sf from "/tmp/TERR_000e6b8b45671/downloaded_packages/sf_0.8-0.tar.gz" to "/tmp/TERR_000e6b8b45671/source_000e721da3172c"
* checking MD5 checksums
    MD5 checksums ok
* installing *source* package from "/tmp/TERR_000e6b8b45671/source_000e721da3172c/sf" to "/home/docker/tibco/site-library"
Error in source2binary(dir, install_opts = install_opts) : Cannot rename old binaryDir from '/home/docker/tibco/site-library/sf' to '/home/docker/tibco/site-library/00LOCK--sf'
    Cannot install package from /tmp/TERR_000e6b8b45671/source_000e721da3172c/sf
> library("sf")
The following object(s) are masked _from_ 'package:RSQLite':

    dbDataType, dbWriteTable
Linking to GEOS 3.6.2, GDAL 2.2.3, PROJ 4.9.3

@ismailsunni
Copy link
Owner Author

For RSQLite I do get a few warnings, but can load the package:

Did you use my Dockerfile where there is already some installed R packages?

For sf, I get an error, but sf is already installed - why do you need to install it again?

Sorry, the main point is not to reinstall sf, but trying to reinstall a package that needs sf. In this case, TERR needs to reinstall sf then it will give the error.

Another example is with RSQLite:

> install.packages('RSQLite')
Trying to download URL 'https://tran.tibco.com/terr50/src/contrib/vctrs_0.1.0.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/vctrs_0.1.0.tar.gz'
  Downloaded 412633 bytes
Trying to download URL 'https://cloud.r-project.org/src/contrib/bit_1.1-14.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/bit_1.1-14.tar.gz'
  Downloaded 54779 bytes
Trying to download URL 'https://cloud.r-project.org/src/contrib/memoise_1.1.0.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/memoise_1.1.0.tar.gz'
  Downloaded 11025 bytes
Trying to download URL 'https://cloud.r-project.org/src/contrib/blob_1.2.0.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/blob_1.2.0.tar.gz'
  Downloaded 9355 bytes
Trying to download URL 'https://cloud.r-project.org/src/contrib/bit64_0.9-7.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/bit64_0.9-7.tar.gz'
  Downloaded 125539 bytes
Trying to download URL 'https://cloud.r-project.org/src/contrib/RSQLite_2.2.0.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/RSQLite_2.2.0.tar.gz'
  Downloaded 2373785 bytes
* unpacking *source* package vctrs from "/tmp/TERR_00016b8b45671/downloaded_packages/vctrs_0.1.0.tar.gz" to "/tmp/TERR_00016b8b45671/source_000174b0dc515"
* checking MD5 checksums
    MD5 checksums ok
* installing *source* package from "/tmp/TERR_00016b8b45671/source_000174b0dc515/vctrs" to "/home/docker/tibco/site-library"
Error in source2binary(dir, install_opts = install_opts) : Cannot rename old binaryDir from '/home/docker/tibco/site-library/vctrs' to '/home/docker/tibco/site-library/00LOCK--vctrs'
    Cannot install package from /tmp/TERR_00016b8b45671/source_000174b0dc515/vctrs
> library('vctrs')
> 

It already has vctrs package, but when I tried to RSQLite (which needs vctrs) it failed because it tried to install vctrs

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

2 participants