Julia: cannot assign a value to variable Base.! from module StaticArrays - julia

I am trying to install Plots package on Julia. Window 10.
using Plots
Full error:
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: cannot assign a value to variable Base.! from module StaticArrays
ERROR: LoadError: Failed to precompile GeometryBasics [5c1252a2-5f33-56bf-86c9-59e7332b4326] to C:\Users\Vladimir\.julia\compiled\v1.7\GeometryBasics\jl_DDF.tmp.
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\Users\Vladimir\.julia\compiled\v1.7\Plots\jl_D09.tmp.
How to deal with it and install the package?

Resolved:
Pkg.rm("Compat")
Pkg.update()
Pkg.add("Compat")
Pkg.build("GR")

Related

I have Enconter a Error in adding and using packages of julia at compiling it show cannot open the file

julia> using Flux, Plots
[ Info: Precompiling Flux [587475ba-b771-5e3f-ad9e-33799f191a9c]
ERROR: LoadError: could not open file /root/.julia/packages/NNlib/FAI3o/deps/deps.jl

What would cause Julia to throw a warning and say that something cannot be imported?

I am trying to get my unit tests for a private repo to run on Travis. However, I am getting the following error:
WARNING: could not import POMDPs.initial_state into PrivateRepo
850ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: initial_state not defined
Edit to make things simpler: what would cause Julia to throw a warning and say that something cannot be imported?
The issue did not end up being as sinister as I guessed. It turns out my Julia 1.0.3 environment had a different version of POMDPs than my PrivateRepo's Manifest.jl file. All I did to fix it was downgrade POMDP's and a couple of packages that depended upon the newer version of POMDP's.

Fail to install RCall - Julia package

Following RCall's documentation, I ran Pkg.add("RCall") which looked to be working. Then, running using RCall gave:
WARNING: could not import StatsModels.Formula into RCall
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
#... few lines later
ERROR: Failed to precompile RCall [6f49c342-dc21-5d91-9882-a32aef131414] to C:\Users\jke4\.julia\compiled\v1.1\RCall\8GFyb.ji.
That's why I ran Pkg.build("RCall"):
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R cannot be found. Set the "R_HOME" environment variable to re-run Pkg.build("RCall").
I believe, accordingly to RCall's documentation that I have to do a custom installation, but why can't am I able to simply install by Pkg.add("RCall") like it's suppose to be done?
RCall.jl can simply be installed with
Pkg.add("RCall")
Note:
Julia version is 1.1.0.
using Conda does work.
There is no R version installed in my Windows computer
I do understand what is my error message and how I can deal with it. My question is why do I have it whereas I wasn't suppose to, quoting RCall's documentation:
RCall.jl will automatically install R for you using Conda if it doesn't detect that you have R 3.4.0 or later installed already.
Update
Alright, I've done what #Cameron Bieganek suggests: pkg> pin StatsModels#0.5
And it seems to work for a moment. However, after doing ] up, accordingly with the issue I had in this question.
using RCall now gives:
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
and Pkg.build("RCall"):
┌ Error: Error building `RCall`:
│ ERROR: LoadError: IOError: stat: invalid argument (EINVAL)
This time I can't get what's the error.
GitHub
Please note that this question is also referenced on GitHub RCall.jl.

Building error with IJulia

I used to use Julia in Jupyter notebook. I uninstalled yesterday the .julia directory because of other issues and after Pkg.add(IJulia) Im getting a building error related to ZMQ. the full error is below.
julia> Pkg.build("ZMQ")
INFO: Building Homebrew
Already up-to-date.
INFO: Building ZMQ
Warning: staticfloat/juliatranslated/zeromq32-3.2.5 already installed, it's just not linked.
Error: Formulae found in multiple taps:
* staticfloat/juliadeps/zeromq32
* staticfloat/juliatranslated/zeromq32
Please use the fully-qualified name e.g. staticfloat/juliadeps/zeromq32 to refer the formula.
=================================[ ERROR: ZMQ ]=================================
LoadError: failed process: Process(`/Users/pacagal/.julia/v0.5/Homebrew/deps/usr/bin/brew link staticfloat/juliatranslated/zeromq32 --force`, ProcessExited(1)) [1]
while loading /Users/pacagal/.julia/v0.5/ZMQ/deps/build.jl, in expression starting on line 35
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: ZMQ had build errors.
- packages with build errors remain installed in /Users/pacagal/.julia/v0.5
- build the package(s) and all dependencies with `Pkg.build("ZMQ")`
- build a single package by running its `deps/build.jl` script
================================================================================
I have also run the build.jl file but I am getting an error too.
I was having the same issue this morning. In the terminal I ran brew install zmq and that resolved the issue.
I still had to run julia>Pkg.build("Nettle") after installing zmq and after that IJulia is running fine.

How to connect .so (C code) to a R package

I have a trouble to create a R package.
I have a compiled C code named "a.so", where "void b(...)" and "void c(...)" were defined in a.so. In R code, dyn.load(a.so) works well to use .C("b",...) and .C("c",...).
To create a R package, I saved a.so file to src folder and wrote useDynLib(a) in NAMESPACE file. However, it gave error messages as below. Could you help me how to handle it? I used RStudio on Ubuntu. (I am not sure why library.dynam was shown, since I did not use it).
Error in library.dynam(lib, package, package.lib) :
shared object ‘a.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed

Resources