Unable to install IJulia failed to clone from repository error - julia

I tried
julia> using Pkg
julia> Pkg.add("IJulia")
And everytime I am getting the same error
Cloning default registries into C:\Users\Himanshu Poddar\.julia\registries
Cloning registry General from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to send request: The connection with the server was terminated abnormally
)
Stacktrace:
[1] pkgerror(::String) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:120
[2] #clone#2(::String, ::Base.Iterators.Pairs{Symbol,LibGit2.CachedCredentials,Tuple{Symbol},NamedTuple{(:credentials,),Tuple{LibGit2.CachedCredentials}}}, ::Function, ::String, ::String) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\GitTools.jl:107
[3] #clone at .\none:0 [inlined]
[4] (::getfield(Pkg.Types, Symbol("##51#55")))(::LibGit2.CachedCredentials) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:933
[5] shred!(::getfield(Pkg.Types, Symbol("##51#55")), ::LibGit2.CachedCredentials) at .\secretbuffer.jl:184
[6] #registries#50(::Bool, ::Function) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:929
[7] registries at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:913 [inlined]
[8] macro expansion at .\logging.jl:307 [inlined]
[9] update_registry(::Pkg.Types.Context) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:97
[10] #handle_repos_add!#32(::Bool, ::Nothing, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:607
[11] #handle_repos_add! at .\none:0 [inlined]
[12] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:54
[13] #add_or_develop at .\none:0 [inlined]
[14] #add_or_develop#12 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:29 [inlined]
[15] #add_or_develop at .\none:0 [inlined]
[16] #add_or_develop#11 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:28 [inlined]
[17] #add_or_develop at .\none:0 [inlined]
[18] #add_or_develop#10 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:27 [inlined]
[19] #add_or_develop at .\none:0 [inlined]
[20] #add#18 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:69 [inlined]
[21] add(::String) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:69
[22] top-level scope at none:0
How can I resolve this issue?

The problem was I guess a firewall issue. I was working on my institution wifi. And then I changed it to my personal hotspot and tried installing it again and it worked.

Related

ERROR: The following package names could not be resolved: error installing package in Julia

I am trying to install julia Flux using pkg add and am getting the following error,
julia> Pkg.add("Flux")
ERROR: The following package names could not be resolved:
* Flux (not found in project, manifest or registry)
Please specify by known `name=uuid`.
Stacktrace:
[1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:120
[2] #ensure_resolved#43(::Bool, ::Function, ::Pkg.Types.EnvCache, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:900
[3] #ensure_resolved at ./none:0 [inlined]
[4] #add_or_develop#15(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:64
[5] #add_or_develop at ./none:0 [inlined]
[6] #add_or_develop#14 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:34 [inlined]
[7] #add_or_develop at ./none:0 [inlined]
[8] #add_or_develop#11 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:33 [inlined]
[9] #add_or_develop at ./none:0 [inlined]
[10] #add_or_develop#10 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:32 [inlined]
[11] #add_or_develop at ./none:0 [inlined]
[12] #add#20 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:74 [inlined]
[13] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:74
[14] top-level scope at none:0
I tried using the ] add https://github.com/FluxML/Flux.jl but got the same error could anyone help please
I tries also adding other packages but similar error occurs and am thinking maybe it is an error with the julia env but am not sure so am not trying to mess with it
Basically, this type of error either means you have no internet connection (or are behind a firewall that is blocking connections by the package manager) or your .julia folder is corrupted.
In the second case the easiest thing to try is to delete .julia folder or set the system variable JULIA_DEPOT_PATH to point to some empty folder and restart Julia.

julia how to use Plots

When I try and use Plots, It errors. Please help me, how can I deal with it? I am using Julia v1.3.0 and did Pgk.add("Plots") to downloads so I don't know why I have this problem... Is the version of Julia or the Plots package wrong? (I am on macOS, is that the issue?)
using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: EOFError: read end of file
Stacktrace:
[1] read(::IOStream, ::Type{Int64}) at ./iostream.jl:361
[2] parse_cache_header(::IOStream) at ./loading.jl:1334
[3] stale_cachefile(::String, ::String) at ./loading.jl:1413
[4] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:752
[5] _require(::Base.PkgId) at ./loading.jl:1001
[6] require(::Base.PkgId) at ./loading.jl:922
[7] require(::Module, ::Symbol) at ./loading.jl:917
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1105
[10] include(::Module, ::String) at ./Base.jl:31
[11] top-level scope at none:2
[12] eval at ./boot.jl:330 [inlined]
[13] eval(::Expr) at ./client.jl:425
[14] top-level scope at ./none:3
in expression starting at /Users/owls/.julia/packages/Plots/3INZP/src/Plots.jl:11
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/owls/.julia/compiled/v1.3/Plots/ld3vC_39ter.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
[3] _require(::Base.PkgId) at ./loading.jl:1024
[4] require(::Base.PkgId) at ./loading.jl:922
[5] require(::Module, ::Symbol) at ./loading.jl:917

Julia Distributions package installation woes

I wish to use the Distributions package in Julia, but can't get to first base. This is what happens when I try adding and using the package:
(v1.1) pkg> add Distributions
Updating registry at `C:\Users\Philip\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `C:\Users\Philip\.julia\environments\v1.1\Project.toml`
[no changes]
Updating `C:\Users\Philip\.julia\environments\v1.1\Manifest.toml`
[no changes]
julia> using Distributions
[ Info: Precompiling Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
ERROR: LoadError: InitError: C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\deps\usr\bin\libopenspecfun.dll cannot be opened, Please re-run Pkg.build("fvheQ"), and restart Julia.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] check_deps() at C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\deps\deps.jl:20
[3] __init__() at C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\src\SpecialFunctions.jl:12
[4] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:633
[5] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:713
[6] _require(::Base.PkgId) at .\loading.jl:937
[7] require(::Base.PkgId) at .\loading.jl:858
[8] require(::Module, ::Symbol) at .\loading.jl:853
[9] include at .\boot.jl:326 [inlined]
[10] include_relative(::Module, ::String) at .\loading.jl:1038
[11] include(::Module, ::String) at .\sysimg.jl:29
[12] top-level scope at none:2
[13] eval at .\boot.jl:328 [inlined]
[14] eval(::Expr) at .\client.jl:404
[15] top-level scope at .\none:3
during initialization of module SpecialFunctions
in expression starting at C:\Users\Philip\.julia\packages\StatsFuns\2QE7p\src\StatsFuns.jl:6
ERROR: LoadError: Failed to precompile StatsFuns [4c63d2b9-4356-54db-8cca-17b64c39e42c] to C:\Users\Philip\.julia\compiled\v1.1\StatsFuns\530lR.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197
[3] _require(::Base.PkgId) at .\loading.jl:960
[4] require(::Base.PkgId) at .\loading.jl:858
[5] require(::Module, ::Symbol) at .\loading.jl:853
[6] include at .\boot.jl:326 [inlined]
[7] include_relative(::Module, ::String) at .\loading.jl:1038
[8] include(::Module, ::String) at .\sysimg.jl:29
[9] top-level scope at none:2
[10] eval at .\boot.jl:328 [inlined]
[11] eval(::Expr) at .\client.jl:404
[12] top-level scope at .\none:3
in expression starting at C:\Users\Philip\.julia\packages\Distributions\tfkz4\src\Distributions.jl:3
ERROR: Failed to precompile Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] to C:\Users\Philip\.julia\compiled\v1.1\Distributions\xILW0.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197
[3] _require(::Base.PkgId) at .\loading.jl:960
[4] require(::Base.PkgId) at .\loading.jl:858
[5] require(::Module, ::Symbol) at .\loading.jl:853
So something's gone wrong and the first line of the error message asks me to Please re-run Pkg.build("fvheQ"), and restart Julia but I think that syntax is for Julia 0.6, prior to the re-vamped Pkg REPL.
Questions
What's an updated version of the Julia 0.6 command Pkg.build("fvheQ"). I'm using Julia 1.1.1.
So far I've always found adding packages worked smoothly in Julia. If it's not too broad a question, what's a good strategy to resolve package installation problems like this?
That's a bug in the error printing. You actually want to run Pkg.build("SpecialFunctions") , which should redownload the shared library libopenspecfun.

ERROR: LoadError: UndefVarError: TCPServer not defined Julia

the following is the code.
using JEMSS
# println(2+3)
filename = selectXmlFile()
sim = initSim(filename);
simulate!(sim) # run the simulation
printSimStats(sim) # some basic statistics
while I'm running this, I got the following error message:
[ Info: Precompiling JEMSS [24979329-2a3d-50cf-82e3-05af2f1830ac]
┌ Warning: Deprecated syntax `#doc call with ->` at /Users/jack/.julia/packages/HttpServer/ZGldt/src/HttpServer.jl:229.
│ Use `a line break` instead.
└ # ~/.julia/packages/HttpServer/ZGldt/src/HttpServer.jl:229
WARNING: importing deprecated binding Base.listen into HttpServer.
ERROR: LoadError: UndefVarError: TCPServer not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
[2] top-level scope at none:0
[3] include at ./boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1038
[5] include(::Module, ::String) at ./sysimg.jl:29
[6] top-level scope at none:2
[7] eval at ./boot.jl:319 [inlined]
[8] eval(::Expr) at ./client.jl:399
[9] top-level scope at ./none:3
in expression starting at /Users/nanal/.julia/packages/HttpServer/ZGldt/src/HttpServer.jl:31
ERROR: LoadError: Failed to precompile HttpServer [58cfbd8c-6b7d-5447-85c1-563540e28d27] to /Users/jack/.julia/compiled/v0.7/HttpServer/SC4ql.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] top-level scope at none:2
[12] eval at ./boot.jl:319 [inlined]
[13] eval(::Expr) at ./client.jl:399
[14] top-level scope at ./none:3
in expression starting at /Users/jack/.julia/dev/JEMSS/src/JEMSS.jl:20
I was trying to search to find out what exactly is this "ERROR: LoadError: UndefVarError: TCPServer not defined", but I can not find any. Can anyone please tell me where I can find any references for it? Many thanks!

Unable to Install packages for Julia 0.7 in Fedora 28 due to ERROR: Unsatisfiable requirements detected

I recently updated my Fedora version from 25 to 28 and with it updated Julia from 0.6 to 0.7.0-alpha.99.
I am now trying to add packages but keep getting the same error:
Pkg.add("PyPlot")
Updating registry at `~/.julia/registries/Uncurated`
Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package (unknown) [10745b16]:
(unknown) [10745b16] log:
├─(unknown) [10745b16] has no known versions!
└─found to have no compatible versions left with Distributions [31c24e10]
└─Distributions [31c24e10] log:
├─possible versions are: [0.1.0-0.1.4, 0.2.0-0.2.13, 0.3.0, 0.6.4-0.6.7, 0.7.0-0.7.6, 0.8.0-0.8.10, 0.9.0, 0.10.0-0.10.2, 0.11.0-0.11.1, 0.12.0-0.12.5, 0.13.0, 0.14.0-0.14.2, 0.15.0, 0.16.0-0.16.2] or uninstalled
└─restricted to versions 0.16.2 by an explicit requirement, leaving only versions 0.16.2
Stacktrace:
[1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1005
[2] propagate_constraints! at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:946 [inlined]
[3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1460
[4] simplify_graph! at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1460 [inlined]
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:291
[6] #add_or_develop#52(::Array{Base.UUID,1}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:973
[7] #add_or_develop at ./none:0 [inlined]
[8] #add_or_develop#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:39
[9] #add_or_develop at ./none:0 [inlined]
[10] #add_or_develop#7 at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:24 [inlined]
[11] #add_or_develop at ./none:0 [inlined]
[12] #add_or_develop#6 at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:23 [inlined]
[13] #add_or_develop at ./none:0 [inlined]
[14] #add_or_develop#5 at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:22 [inlined]
[15] #add_or_develop at ./none:0 [inlined]
[16] #add#9 at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:44 [inlined]
[17] add(::String) at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:44
[18] top-level scope at none:0
[19] macro expansion at /builddir/build/BUILD/julia/build/usr/share/julia/stdlib/v0.7/REPL/src/REPL.jl:116 [inlined]
[20] (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at ./task.jl:257
The same thing happens with other packages (I have tried IJulia, Conda, Distributions).
You mention that you upgraded to 0.7.0-alpha.99. There is a stable release for 0.7.0 which you should use instead of an alpha version. You can find it on https://julialang.org/downloads/ under "Previous stable release (v0.7.0)".
In general, as Julia is changing at a fast pace you should always use the binaries from julialang.org instead of the binaries in your OS's package manager as they almost certainly won't be up to date (as in your case).
On a side note, from Julia 0.7 on the way to add packages has slightly changed. See my post here: How to install a package in Julia 1.0 (UndefVarError: Pkg not defined)

Resources