# Pkg.precompile error - exception during pkg\> update

**URL:** https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482
**Category:** Package Management
**Tags:** package
**Created:** [September 20, 2021, 4:42pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482 "2021-09-20T16:42:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Toxiro](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Toxiro](https://discourse.julialang.org/u/Toxiro)
#### Post date: [September 20, 2021, 4:42pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482/1 "2021-09-20T16:42:36Z")

</div>

Hello everybody,

I am updating the packages in the Julia v1.6 pkg\> REPL and during precompilation I get the following stacktrace error:

(@v1.6) pkg\> update  
Updating registry at `~/.julia/registries/General`  
Installed DataAPI ─ v1.9.0  
No Changes to `~/.julia/environments/v1.6/Project.toml`  
Updating `~/.julia/environments/v1.6/Manifest.toml`  
[9a962f9c] ↑ DataAPI v1.8.0 ⇒ v1.9.0  
Precompiling project…

┌ Error: Pkg.precompile error  
│ exception =  
│ MethodError: Int64(::Char) is ambiguous. Candidates:  
│ (::Type{T})(x::AbstractChar) where T\<:Union{AbstractChar, Number} in Base at char.jl:50  
│ Int64(c) in Main at REPL[9]:1  
│ Possible fix, define  
│ Int64(::AbstractChar)  
│ Stacktrace:  
│ [1] (::Pkg.API.var"#209#236"{Vector{Base.PkgId}, Int64, Pkg.MiniProgressBars.MiniProgressBar, Vector{String}, String, String, Pkg.API.var"#ansi\_moveup#230", Pkg.API.var"#color\_string#229", Base.Event, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Bool}, Vector{Base.PkgId}, Base.TTY})(iostr::IOBuffer)  
│ @ Pkg.API /Users/julia/buildbot/worker/package\_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1077  
│ [2] sprint(::Function; context::Nothing, sizehint::Int64)  
│ @ Base ./strings/io.jl:105  
│ [3] sprint  
│ @ ./strings/io.jl:101 [inlined]  
│ [4] (::Pkg.API.var"#208#235"{Int64, Pkg.MiniProgressBars.MiniProgressBar, Vector{String}, String, String, Pkg.API.var"#ansi\_moveup#230", Pkg.API.var"#color\_string#229", Base.Event, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Bool}, Vector{Base.PkgId}, Base.TTY})()  
│ @ Pkg.API /Users/julia/buildbot/worker/package\_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1053  
│ [5] lock(f::Pkg.API.var"#208#235"{Int64, Pkg.MiniProgressBars.MiniProgressBar, Vector{String}, String, String, Pkg.API.var"#ansi\_moveup#230", Pkg.API.var"#color\_string#229", Base.Event, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Bool}, Vector{Base.PkgId}, Base.TTY}, l::ReentrantLock)  
│ @ Base ./lock.jl:187  
│ [6] macro expansion  
│ @ /Users/julia/buildbot/worker/package\_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1045 [inlined]  
│ [7] (::Pkg.API.var"#206#233"{Pkg.API.var"#handle\_interrupt#231"{Base.Event, ReentrantLock, Base.TTY}, String, String, String, String, Pkg.API.var"#ansi\_moveup#230", Pkg.API.var"#color\_string#229", Base.Event, Base.Event, ReentrantLock, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Vector{Base.PkgId}}, Vector{Base.PkgId}, Bool, Base.TTY})()  
│ @ Pkg.API ./task.jl:411  
└ @ Pkg.API /Users/julia/buildbot/worker/package\_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1023

Any suggestion would be very welcome (thank you in advance)

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [September 20, 2021, 4:45pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482/2 "2021-09-20T16:45:12Z")

</div>

How did you download Julia? This is a strange error.

---

<div class="post-metadata">

### Author: ![Toxiro](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Toxiro](https://discourse.julialang.org/u/Toxiro)
#### Post date: [September 20, 2021, 4:49pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482/3 "2021-09-20T16:49:19Z")

</div>

hello,

I just installed it via the .dmg (Mac OS vs.10.14.6) at:

> **[Download Julia](https://julialang.org/downloads/)**
>
> The official website for the Julia Language. Julia is a language that is fast, dynamic, easy to use, and open source. Click here to learn more.

PS.  
…I tried to act other commands on the pkg\> REPL, like ‘instantiate’, or ‘precompile’, but the output is the same

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [September 20, 2021, 4:50pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482/4 "2021-09-20T16:50:20Z")

</div>

Huh. That’s the right way to download. Hopefully someone more informed can help out.

---

<div class="post-metadata">

### Author: ![Toxiro](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Toxiro](https://discourse.julialang.org/u/Toxiro)
#### Post date: [September 20, 2021, 5:15pm UTC](https://discourse.julialang.org/t/pkg-precompile-error-exception-during-pkg-update/68482/5 "2021-09-20T17:15:09Z")

</div>

I tried the following:  
(1) shut down Julia and the CLI terminal  
(2) reopened another CLI Terminal instance and run $ Julia  
(3) selected ‘]’ to the pkg\> REPL, then run ‘precompile’  
(4) the package ‘RCall’ (i.e., to call R into Julia) did NOT compile and was marked by a red ‘x’ cross  
(5) tried to run Pkg.build(“RCall”) but the output was and ERROR  
(6) just deleted the package with ‘remove RCall’  
(7) run again ‘precompile’, which was successfully executed  
(8) run again the ‘update’ command, and now everything went smoothly.

Hope that could help someone else, too
