Open ismailsunni opened 5 years ago
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:
R CMD javareconf
does, and replicate itrJava
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
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?
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.
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
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
Always had a problem with libproj not found on Debian based. Changed to use Ubuntu base image. It works.