-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add packages in Julia 1.3-RC2 #33382
Comments
So |
I suppose so. I typed
|
But that works on 1.2? |
Yes, works on all previous versions (1.2 and prior). |
If you do @eval Base.Filesystem begin
function mktemp(parent::AbstractString=tempdir(); cleanup::Bool=true)
@show b = joinpath(parent, temp_prefix * "XXXXXX")
@show p = ccall(:mkstemp, Int32, (Cstring,), b) # modifies b
@show b
systemerror(:mktemp, p == -1)
# cleanup && temp_cleanup_later(b)
return (b, fdio(p, true))
end
end
mktemp() what does it output on 1.2 vs 1.3-rc2 respectively? |
v1.2: julia> @eval Base.Filesystem begin
function mktemp(parent::AbstractString=tempdir(); cleanup::Bool=true)
@show b = joinpath(parent, temp_prefix * "XXXXXX")
@show p = ccall(:mkstemp, Int32, (Cstring,), b) # modifies b
@show b
systemerror(:mktemp, p == -1)
# cleanup && temp_cleanup_later(b)
return (b, fdio(p, true))
end
end
mktemp (generic function with 5 methods)
julia> mktemp()
b = joinpath(parent, temp_prefix * "XXXXXX") = "/var/tmp/jl_XXXXXX"
p = ccall(:mkstemp, Int32, (Cstring,), b) = 21
b = "/var/tmp/jl_0mwOtU"
("/var/tmp/jl_0mwOtU", IOStream(<fd 21>))
v1.3-RC2: julia> @eval Base.Filesystem begin
function mktemp(parent::AbstractString=tempdir(); cleanup::Bool=true)
@show b = joinpath(parent, temp_prefix * "XXXXXX")
@show p = ccall(:mkstemp, Int32, (Cstring,), b) # modifies b
@show b
systemerror(:mktemp, p == -1)
# cleanup && temp_cleanup_later(b)
return (b, fdio(p, true))
end
end
mktemp (generic function with 4 methods)
julia> mktemp()
b = joinpath(parent, temp_prefix * "XXXXXX") = "/Users/peter/.tmp/jl_XXXXXX"
p = ccall(:mkstemp, Int32, (Cstring,), b) = -1
b = "/Users/peter/.tmp/jl_i0cGAH"
ERROR: SystemError: mktemp: No such file or directory
Stacktrace:
[1] #systemerror#44(::Nothing, ::typeof(systemerror), ::Symbol, ::Bool) at ./error.jl:134
[2] #mktemp#22 at ./error.jl:134 [inlined]
[3] mktemp at ./REPL[1]:3 [inlined] (repeats 2 times)
[4] top-level scope at REPL[2]:1 |
I think, I just see the problem. There is no folder |
Looks like it's |
Yes, you're right: julia> homedir()
"/Users/home"
julia> tempdir()
"/Users/peter/.tmp" |
From http://docs.libuv.org/en/v1.x/misc.html
Do you have one of those temp variables set? |
I think, I once overwrote tempdir manually, because I had problems with too long folder names, when they were created automatically. I can't remember, how I did it though, I am not very familiar with these things. Where would I overwrite the tempdir? |
Maybe in |
Yes, it was an outdated path in my bashrc and my own stupidity. I just wasn't expecting this kind of mistake as everything was working just fine with the previous versions. Thank you a lot for the very fast help. So, I am closing this issue. |
Should we try to create |
Reopening to discuss handling this situation more gracefully. |
Close? |
Potential more graceful handling of #33382. I thought about creating the directory if it doesn't exist, but that seems aa bit questionable. Probably better to let the user know about the situation in a clear way so they can mitigate it. An even better improvement would be if we could tell them which environment variable to look at. I tried setting `TEMP` in the environment on macOS but it didn't seem to have any effect on the result. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
When trying to add packages in Julia 1.3-RC2, I get a SystemError (
mktemp: No such file or directory
) on MacOS. I tried to install several packages and all threw the same error. Also tested it on the latest nightly build (see version info below).I am using Julia 1.3-RC2 on MacOS Majave.
Or nightly build:
The text was updated successfully, but these errors were encountered: