# Can't add Distributions/Rmath packages in Julia 1.7

**URL:** <https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453>\
**Category:** Package Management\
**Tags:** question, package\
**Created:** [December 2, 2021, 2:10pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453 "2021-12-02T14:10:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![way2toronto](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@way2toronto](https://discourse.julialang.org/u/way2toronto)\
**Post date:** [December 2, 2021, 2:10pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/1 "2021-12-02T14:10:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 2, 2021, 3:02pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/2 "2021-12-02T15:02:39Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![way2toronto](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@way2toronto](https://discourse.julialang.org/u/way2toronto)\
**Post date:** [December 2, 2021, 3:11pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/3 "2021-12-02T15:11:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 2, 2021, 3:16pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/4 "2021-12-02T15:16:04Z")

</div>

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

> [@Unable to automatically install 'OpenSpecFun' when trying to add 'Symbolics'](https://discourse.julialang.org/t/unable-to-automatically-install-openspecfun-when-trying-to-add-symbolics/60950/8):
>
> Unfortunately I’m not sure DebugArtifacts.jl is very reliable for debugging this kind of issues with Julia v1.6, as the download stack changed a lot

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

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 2, 2021, 3:21pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/5 "2021-12-02T15:21:24Z")

</div>

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

```julia
using Downloads: download

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

```

---

<div class="post-metadata">

**Author:** ![way2toronto](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@way2toronto](https://discourse.julialang.org/u/way2toronto)\
**Post date:** [December 2, 2021, 3:49pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/6 "2021-12-02T15:49:28Z")

</div>

- Couldn’t find host [pkg.julialang.org](http://pkg.julialang.org) in the .netrc file; using defaults
- Trying 151.101.126.217:80…
- Connected to [pkg.julialang.org](http://pkg.julialang.org) (151.101.126.217) port 80 (#0)

> GET /meta HTTP/1.1  
> Host: [pkg.julialang.org](http://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](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](http://pkg.julialang.org) left intact
- Issue another request to this URL: ‘[https://us-east.pkg.julialang.org/meta](https://us-east.pkg.julialang.org/meta)’
- Couldn’t find host [us-east.pkg.julialang.org](http://us-east.pkg.julialang.org) in the .netrc file; using defaults
- Trying 52.90.48.121:443…
- Connected to [us-east.pkg.julialang.org](http://us-east.pkg.julialang.org) (52.90.48.121) port 443 (#1)

> GET /meta HTTP/1.1  
> Host: [us-east.pkg.julialang.org](http://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](http://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](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)

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 2, 2021, 5:52pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/7 "2021-12-02T17:52:18Z")

</div>

Ok, so not a firewall issue then.

---

<div class="post-metadata">

**Author:** ![way2toronto](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@way2toronto](https://discourse.julialang.org/u/way2toronto)\
**Post date:** [December 2, 2021, 6:30pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/8 "2021-12-02T18:30:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![way2toronto](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@way2toronto](https://discourse.julialang.org/u/way2toronto)\
**Post date:** [December 3, 2021, 7:08pm UTC](https://discourse.julialang.org/t/cant-add-distributions-rmath-packages-in-julia-1-7/72453/9 "2021-12-03T19:08:50Z")

</div>

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?
