I would like to install the R Package JuliaCall, to use Julia from R. I have installed Julia via snap and installed the JuliaCall R package form the Cran.
I received the following error when trying to use the setup function of JuliaCall.
library(JuliaCall)
julia <- julia_setup()
Julia version 1.0.4 at location /snap/julia/13/bin will be used.
Error in dyn.load(.julia$dll_file) :
unable to load shared object '/snap/julia/13/bin/../lib/libjulia.so.1':
/snap/julia/13/bin/../lib/libjulia.so.1: wrong ELF class: ELFCLASS32
Show Traceback
Rerun with Debug
Error in juliacall_initialize(.julia$dll_file) :
/snap/julia/13/bin/../lib/libjulia.so.1 - /snap/julia/13/bin/../lib/libjulia.so.1: wrong ELF class: ELFCLASS32
Julia is installed:
XRJulia::findJulia()
[1] "/snap/bin/julia"
I have tried some suggestions found in
https://github.com/Non-Contradiction/JuliaCall/issues/72
and even report my problems, but I'm not sure if this is an issue to open on Github or a problem with my installation.
The same error occurs
My system specifications are:
Ubuntu 18.04,
Rstudio 1.1.456,
R 3.5.1,
Julia installed via snap
Thanks for any help you could provide
Actually, the developer of JuliaCall answered my question.
I have installed Julia using snap without noticing that a 32bits version was used. Installing Julia from the .tar.gz archive and choosing the correct 64 bits version solve this problem.
Many Thanks to #Non-Contradiction.
Related
After upgrading to R 3.6.2 I am getting a series of errors about earlier versions of libraries being used :
Error: package ‘stringi’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
I have worked through several of these via
install.packages('stringi')
but that just leads down the rabbit hole to the next mismatched library. What I'd like to do is en-masse upgrade the existing libraries. Here is a suggestion to use:
lib_loc <- "<old R library path"
to_install <- unname(installed.packages(lib.loc = lib_loc)[, "Package"])
to_install
install.packages(pkgs = to_install)
However - where is the <old R library path> on ubuntu?
Update Based on suggestion from #RuiBarradas I ran:
update.packages(ask=FALSE)
But the "different internals" errors shown above still happens for many packages. So I am still looking for an answer to how to upgrade the ones installed on the older version of R (3.4.4)
Following did the trick - thanks to #RuiBarradas for the pointer to update.packages:
update.packages(checkBuilt=TRUE, ask=FALSE)
Due to my company's firewall I am manually installing packages from local. No errors when building the package from terminal, but I get an error when I load the package using library function
unable to load shared object 'C:/Program Files/R/R-3.6.1/library/Rcpp/libs/x64/Rcpp.dll':
LoadLibrary failure: The specified procedure could not be found.
And it also throws a prompt
Any help is appreciated thanks!
Tried:
Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object
https://github.com/r-lib/rlang/issues/306
None of the above seemed to work
I had this issue. I was using R 4.0.0 in RStudio (1.2.5042). I had been using R just fine all morning and continually had this issue all afternoon. I restarted my computer, updated my packages, and confirmed everything worked well on another computer. Finally I updated to R 4.0.2 and my issue resolved.
My binary package was correctly pathed to 4.0/Rcpp. I still don't know what caused the issue, but since this seemed to fix it hope it will for any future folk with this issue!
There has been a significant change in the build tools used for binary R packages on Windows:
Starting with R 4.0.0 (released April 2020), R for Windows uses a brand new toolchain bundle called rtools40.
https://cran.r-project.org/bin/windows/Rtools/
This means one has to be extra careful to get the correct file when downloading binary packages from CRAN, since packages for build with incompatible build tools will not work. At the time of writing this means:
Use the ones for r-oldrel for R 3.6
Use the ones for r-release for R 4.0
When this question was asked, R 4.0 was still r-devel.
You do not have to think about this things when using the build in install.packages() instead of manually downloading files from CRAN.
My end goal is to be able to use the geoR and sp packages in R on an AWS EC2 Linux instance. The first hurdle is getting an older version of R since 3.3 doesn't support TCL/TK (at least that I've found).
After unpacking R-3.2.5.tar.gz and following the instructions in the INSTALL file (along with these configure options), a search in the config.log shows the following for TCL and TK:
configure:32908: checking for tclConfig.sh
configure:32950: checking for tclConfig.sh in library (sub)directories
configure:33143: checking for tcl.h
conftest.c:228:17: fatal error: tcl.h: No such file or directory
#include <tcl.h>
config.status:1893: creating src/library/tcltk/DESCRIPTION
config.status:1893: creating src/library/tcltk/Makefile
config.status:1893: creating src/library/tcltk/src/Makefile
ac_cv_env_TCLTK_CPPFLAGS_set=
ac_cv_env_TCLTK_CPPFLAGS_value=
ac_cv_env_TCLTK_LIBS_set=
ac_cv_env_TCLTK_LIBS_value=
r_cv_header_tcl_h=no
TCLTK_CPPFLAGS=''
TCLTK_LIBS=''
TCL_CONFIG=''
use_tcltk='no'
R installs successfully, but running capabilities("tcltk") confirms that something went wrong, as it returns FALSE.
Following the hints here, I searched for tclConfig.sh and tkConfig.sh, and realized I hadn't installed the appropriate dependencies, namely tcl-devel, and tk-devel.
Running yum list available shows a package for tcl-devel.x86_64 but nothing for tk. I downloaded source files for TCL and TK from here, but couldn't find source files for any devel packages.
So now I'm at a loss on how to proceed. Has anyone been through this process that can shed some light on it?
UPDATE
After reading the comment below, I'm afraid I didn't do my due diligence in researching TCL/TK and R 3.3.
My very early efforts to troubleshoot the whole problem consisted of the following workflow- First, without even considering an older version of R, I ran install.packages("geoR") in 3.3.2. This resulted in installation of package 'geoR' had non-zero exit status, along with:
Error: package 'tcltk' does not have a namespace
ERROR: lazy loading failed for package 'geoR'
So, naturally, I ran install.packages("tcltk") which resulted in package 'tcltk' is not available (for R version 3.3.2)
As I mentioned before, this was very early on. I took the message literally and didn't think to look further into TCL/TK for 3.3, but instead started looking to get an earlier version of R, since I had been successfully running geoR and sp on another system that had R 3.2.5.
I am running OSX 10.10, R-Studio Version 0.99.484, and R version 3.2.2.
I just made a fresh install of R and R-Studio using the installers from their respective websites. I use install.packages to install "mosaic" and then I try loading it using library, but it gives me the following error:
library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
Error : object ‘dendro_data.hclust’ is not exported by 'namespace:ggdendro'
Error: package or namespace load failed for ‘mosaic’
I tried reinstalling ggdendro but nothing. Does anyone have any advice on how to deal with this issue?
I encountered this same error and seem to have somewhere along the way resolved it. Steps taken include:
cleaned out my libraries (local and System)
used Disk Utility to repair any odd permissions
reinstalled R
opened RStudio and imported package with dependencies from the repository:
> install.packages("mosaic", lib="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
console prompted me to choose the older precompiled package or the newer, I chose older
Do you want to install from sources the package which needs compilation?
y/n: n
mosaic loaded happily
> library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
I have been trying to install bigmemory on my R installation.
My OS is windows 7 64 bit and I have tried it on R V2.15.1,2.15.2 and 3.0.1 64 bit but I cant get it to work.
I have tried several options
download the current source and run the command in R v3.0.1
install.packages("D:/Downloads/bigmemory_4.4.3.tar.gz", repos =
NULL, type="source")
but this gives an error "ERROR: Unix-only
package"
download older sources and run a similar commands, in the various
installations of R V2 V3 etc,
This gives me an error "ERROR:
configuration failed for package 'bigmemory'"
Any ideas? I am actually trying to install bigrf but bigmemory seems to be a dependency. Is there any workaround for this?
Many thanks
Seems the github version installs OK on Windows:
install.packages(c("BH","biglm"))
library(devtools)
devtools::install_github('kaneplusplus/bigmemory')
library(bigmemory)
the package authors told me they are fixing the CRAN one to work on Windows again too.
Going to the CRAN page here, shows you that you have to compile the sources on windows. Google how to do it or look at official document : here
Of course if package A depends on B you have to install B before A yourself.
EDIT: actually it says OS_type : unix