R-dev not having support for TCL/TK (Tcl/Tk support is not available on this system)
Getting the following error while trying to install an R package called "smbinning"
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Tcl/Tk support is not available on this system
Execution halted
Here is my docker image,
FROM alpine:3.10
##################################
## Install R & its Dependencies
##################################
RUN set -ex; \
apk --no-cache add --virtual build-dependencies \
build-base \
automake \
autoconf \
bash \
R==3.6.0-r1 R-dev==3.6.0-r1; \
echo 'options(repos = c(CRAN = "https://cloud.r-project.org/"))' >> /usr/lib/R/etc/Rprofile.site; \
R -e 'capabilities("tcltk");'; \
R -e 'install.packages(c("smbinning"));'; \
apk del --purge --rdepends build-dependencies
The output from the logs says,
+ R -e 'capabilities("tcltk");'
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-musl (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> capabilities("tcltk");
tcltk
FALSE
I also checked the Build logs, and it seems that there is some error with tcl/tk lib linking https://build.alpinelinux.org/buildlogs/build-3-10-x86_64/community/R/R-3.6.0-r1.log
checking whether compiling/linking Tcl/Tk code works... no Interfaces supported: X11
Usually we get the following when ttcl/tk supported
Interfaces supported: X11, tcltk