How to install tcl/tk in R in linux without root permission
0
0
Entering edit mode
5.6 years ago
afli ▴ 190

Hi, I've met some troubles when installing tcl/tk in R3.5.1 without root. I use the following configure information:

./configure --prefix=/home/afli/work/softwares/R3.5.1_afli --with-tcltk --with-tcl-config=/home/afli/work/softwares/Fortcl/lib/tclConfig.sh --with-tk-config=/home/afli/work/softwares/Fortk/lib/tkConfig.sh

Then make $ make install. The installing was OK. And I check the capabilities()["tcltk"], it's OK too. However, when I library(tcltk), it just show the following error:

> library(tcltk)
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
 call: fun(libname, pkgname)
 error: Can't find a usable init.tcl in the following directories: 
 /usr/local/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.9/library ./tcl8.6.9/library

I've successfully installed tcl and tk, but R3.5.1 just look into the wrong path in /usr/local/lib, where I did not have root access to change. So how to let R look into my own path to link to the tcl and tk? Or is there any other solutions? I've searched lots but did not find the solution. Thank you very much!

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /mnt/tiger/afli/softwares/R3.5.1_afli/lib/R/lib/libRblas.so
LAPACK: /mnt/tiger/afli/softwares/R3.5.1_afli/lib/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
[3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
[5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
[7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_3.5.1

Best, Aifu.

R linux tcl/tk • 2.2k views
ADD COMMENT
0
Entering edit mode

As this is a pretty specific R question, I suggest to post it over at StackExchange to reach a broader audience.

ADD REPLY
0
Entering edit mode

you can try brew or conda in user space @ afli

ADD REPLY

Login before adding your answer.

Traffic: 1898 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6