Can't add Distributions/Rmath packages in Julia 1.7

Hi. I have just made a fresh install of Julia 1.7 and trying to install packages to run the existing code. Most of the required packages have been installed, but I ran into a problem with Distributions, which is dependent on Rmath, which is failing with an error message “Unable to automatically install ‘Rmath’ from C…julia\packages\Rmath_jll\ss2ik\Artifacts.toml”.
I did use a similar Julia configuration on 1.7-rc2 and there was no such a problem (even though Distributions wasn’t dependent on Rmath, but both packages could be installed separately without issues).

I don’t need Rmath for my purposes, but it’s now failing Distributions due to the introduced dependency in release 1.7, and I can’t find a way to solve it (I tried, restarting, up, gc, precompile, build, whatever tricks worked in the past, but this is something new). I am looking to solve this particular problem as well get tips on how to deal with frequent package installation errors in general. Thanks.

What system are you on? I can install Distributions just fine on 1.7.0 on Windows 10.

(Also I believe Distributions has used RMath forever, this is not a dependency introduced in 1.7)

Thanks for the info. I am on Windows 10 as well (build 19042).
I’ve seen people saying that order in which you install packages matter, not sure.
Apart from removing the whole thing and re-installing possibly in a different order, what can be done when you get “Unable to automatically install [package]” error messages?

There’s a bunch of threads on here with that error messages, and usually it’s users on systems with download restrictions (corporate firewalls etc.), see for example

I don’t really know what to do in these cases unfortunately other than moaning on here and hoping that @giordano spots the thread.

1 Like

You can try the same network debugging thing that Elliot posted over there:

using Downloads: download

download("http://pkg.julialang.org/meta", stdout; verbose=true)

GET /meta HTTP/1.1
Host: pkg.julialang.org
Accept: /
User-Agent: curl/7.73.0 julia/1.7

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 301 NA (east) internal redirect trigger
    < Server: Varnish
    < Retry-After: 0
    < Location: https://us-east.pkg.julialang.org/meta
    < x-geo-continent: NA
    < x-geo-country: CA
    < x-geo-region: ON
    < Content-Length: 0
    < Accept-Ranges: bytes
    < Date: Thu, 02 Dec 2021 15:35:57 GMT
    < Via: 1.1 varnish
    < Xonnection: close
    < X-Served-By: cache-lga21944-LGA
    < X-Cache: HIT
    < X-Cache-Hits: 0
    < X-Timer: S1638459574.487457,VS0,VE0
    < Connection: Keep-Alive
  • Connection #0 to host pkg.julialang.org left intact
  • Issue another request to this URL: ‘https://us-east.pkg.julialang.org/meta
  • Couldn’t find host us-east.pkg.julialang.org in the .netrc file; using defaults
  • Trying 52.90.48.121:443…
  • Connected to us-east.pkg.julialang.org (52.90.48.121) port 443 (#1)

GET /meta HTTP/1.1
Host: us-east.pkg.julialang.org
Accept: /
User-Agent: curl/7.73.0 julia/1.7

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Server: nginx/1.21.3
    < Date: Thu, 02 Dec 2021 15:35:58 GMT
    < Content-Type: application/json
    < Content-Length: 322
    < Connection: keep-alive
    < X-lb-strategy: pkgservers_roundrobin
    <
  • Connection #1 to host us-east.pkg.julialang.org left intact
    {“start_time”:“2021-12-02T06:25:15.482”,“pkgserver_version”:“0.2.0-175f5c1a8e78f88af1e5bdf1d5165d0299dbae30”,“pkgserver_url”:“https://us-east8.pkg.julialang.org”,“julia_version”:“1.6.3”,“registry_watchdog_task”:“started”,“last_registry_update”:“2021-12-02T15:35:57.150”,“registry_update_task”:“started”,“maxrss”:419893248}Base.TTY(Base.Libc.WindowsRawSocket(0x0000000000000270) open, 0 bytes waiting)
1 Like

Ok, so not a firewall issue then.

Thanks. Yes, the issue is weird – I installed Julia 1.7.0 on my other machine, and Distributions installed with no problems (although I skipped all other packages). I guess the only solution for the original machine would be to re-install from scratch unless anyone gives me some good suggestions.

Update: I think the problem is not with 1.7.0 after all and @nilshg was right that it is not a new dependency. I have tried removing Julia 1.7.0 and installing 1.6.4 and Distributions as the first package there. Still running into the same problem… Not sure how to troubleshoot here. Any suggestions?