# Can't Pkg.add probably due to bug

**URL:** <https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544>\
**Category:** New to Julia\
**Tags:** package-manager\
**Created:** [February 4, 2025, 5:07pm UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544 "2025-02-04T17:07:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Legarra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andres_legarra/32/8786_2.png) [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Post date:** [February 4, 2025, 5:07pm UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/1 "2025-02-04T17:07:47Z")

</div>

Hi

we use `julia version 1.6.1` in a server (of which I am _not_ root) and all went smoothly for months. Now we can not install packages any longer, instead we get

```julia
julia> using Pkg; Pkg.add("Optim")
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
┌ Error: curl_multi_socket_action: 8
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36

```

and it gets stuck. Control-C does not do anything useful.

This has been reported elsewhere (e.g. [Error on installation packages](https://discourse.julialang.org/t/error-on-installation-packages/77914) and (I think) [StackOverflowError with curl\_multi\_socket\_action · Issue #94 · JuliaLang/Downloads.jl · GitHub](https://github.com/JuliaLang/Downloads.jl/issues/94) . But I don’t see a solution other than installing a new version, which is a Big Hassle. Does anyone have a workaround?

thanks

Andres

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 4, 2025, 7:10pm UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/2 "2025-02-04T19:10:35Z")

</div>

> [@Andres\_Legarra](#):
>
> But I don’t see a solution other than installing a new version, which is a Big Hassle.

Why would it be a big hussle? The current long-term stable version that gets bug fixes and security updates is Julia 1.10. Did you test if your code works with Julia 1.10? If yes, I would install it.

And if you use [juliaup](https://github.com/JuliaLang/juliaup), switching between Julia versions is trivial. No need for root permissions.

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [February 4, 2025, 7:52pm UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/3 "2025-02-04T19:52:15Z")

</div>

> [@Andres\_Legarra](#):
>
> [StackOverflowError with curl\_multi\_socket\_action · Issue #94 · JuliaLang/Downloads.jl · GitHub](https://github.com/JuliaLang/Downloads.jl/issues/94) . But I don’t see a solution other than installing a new version

If I read that correctly, it seems there might be a link with multithreading. Have you tried running Julia on a single thread (`julia -t 1`)?

---

<div class="post-metadata">

**Author:** ![Andres\_Legarra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andres_legarra/32/8786_2.png) [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Post date:** [February 5, 2025, 8:34am UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/4 "2025-02-05T08:34:46Z")

</div>

I did, it does not work:

```julia
$ julia -t 1
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using Pkg; Pkg.add("Optim")
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
┌ Error: curl_multi_socket_action: 8
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
┌ Error: curl_multi_socket_action: 8

```

---

<div class="post-metadata">

**Author:** ![Andres\_Legarra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andres_legarra/32/8786_2.png) [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Post date:** [February 5, 2025, 8:39am UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/5 "2025-02-05T08:39:09Z")

</div>

Let’s say that it involves work for “root” which has other priorities. Plus the extra work of installing all packages. Doing these things in computation servers with \>10 users is not trivial.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [February 5, 2025, 9:05am UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544/6 "2025-02-05T09:05:57Z")

</div>

You don’t need to have root privileges to use juliaup, it installs Julia in userspace
