Skip to content
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

Mix deps.get hanging #26

Closed
lukashambsch opened this issue Nov 2, 2019 · 23 comments
Closed

Mix deps.get hanging #26

lukashambsch opened this issue Nov 2, 2019 · 23 comments

Comments

@lukashambsch
Copy link

I'm trying to upgrade from elixir 1.8.1 to 1.9.2. After upgrading, I get this error when running mix test:

could not compile dependency :bcrypt_elixir, "mix compile" failed. You can recompile this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
==> any_gym_planner
** (Mix) Could not compile with "make" (exit status: 69).
You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.

So I checked the versions of bcrypt_elixir and noticed that there is now a version 2. So I tried upgrading to version 2 and when I run mix deps.get it just hangs after outputting Resolving Hex dependencies.... Any ideas on what would cause this?

@lukashambsch
Copy link
Author

The first error seems to be resolved by accepting the xcode agreement (not sure what effect the elixir upgrade had on this). But it's still hanging when I try to upgrade bcrypt_elixir to 2.0.

@riverrun
Copy link
Owner

riverrun commented Nov 4, 2019

I am not sure if this will make a difference, but please make sure that comeonin is not in the list of dependencies in the mix.exs file.

I will look into this issue further and get back to as soon as I can.

@lukashambsch
Copy link
Author

It is not in the mix.exs file. But I do see it in the mix.lock file.

@riverrun
Copy link
Owner

riverrun commented Nov 5, 2019

Ok. I will try to find out more about this problem and get back to you soon.

@riverrun
Copy link
Owner

riverrun commented Jan 8, 2020

In this issue, they suggest upgrading hex to solve a similar problem. Could you try that and let me know if it works?

@lukashambsch
Copy link
Author

lukashambsch commented Jan 9, 2020

It's still just hanging for me even after running mix local.hex --force.

@riverrun
Copy link
Owner

Ok. One more suggestion: try running mix deps.clean --unlock --unused, and then run mix deps.get.

@lukashambsch
Copy link
Author

Sorry for the slow response. I tried running mix deps.clean --unlock --unused, then running mix deps.get. Unfortunately it's still hanging when I have {:bcrypt_elixir, "~> 2.0"} in my dependencies.

@riverrun
Copy link
Owner

Someone using pbkdf2_elixir solved a similar issue by running HEX_HTTP_CONCURRENCY=1 HEX_HTTP_TIMEOUT=120 mix deps.get.

@lukashambsch
Copy link
Author

Still no luck. Just hanging when I run that command too.

@riverrun
Copy link
Owner

riverrun commented Mar 1, 2020

Sorry to hear you are still having these issues. I don't really know what to suggest to fix it at the moment, but if I hear of anything, I will let you know.

@lukashambsch
Copy link
Author

That's alright. I appreciate everything you've done to try & help. Thanks!

@Boubalou
Copy link

Boubalou commented Apr 6, 2020

I do have this issue when trying to use version 2.2 in my mix.exs.

My Dockerfile also hang and kill the process, using this setup:

FROM hexpm/elixir:1.9.3-erlang-22.3-alpine-3.11.3 AS otp-builder`

@rodrigoporcionato
Copy link

rodrigoporcionato commented May 4, 2020

If you are using windows, maybe the problem is related to nmake.exe

in your project elixir try it:

1- is necessary to have installed the vs studio. Check you location of vs is installed.

run
cmd /K "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
After this, execute mix deps.compile

See more in:
https://stackoverflow.com/questions/49471198/how-to-fix-could-not-compile-dependency-bcrypt-elixir-error-on-windows

@tatiesmars
Copy link

I m having similar issue with this image

FROM elixir:1.12.1-alpine 

What I dont understand is that it work on my laptop but not on remote server

@phcurado
Copy link

phcurado commented Jul 6, 2021

I m having similar issue with this image

FROM elixir:1.12.1-alpine 

What I dont understand is that it work on my laptop but not on remote server

I'm having the same problem, locally the image is compiling, on my CI is failing with the same error from this issue.

@dnsbty
Copy link

dnsbty commented Jul 17, 2021

I have the same issue with elixir:1.12-alpine. It looks like some sort of permission issue because when I have my Dockerfile just get dependencies but not download them and then run with docker run -it my_app:latest "sh" and then run mix deps.compile it gives me this error. But when I do the same thing with docker run -it --privileged my_app:latest "sh" then it compiles like normal. I'm not really sure where to go from there though.

@dnsbty
Copy link

dnsbty commented Jul 17, 2021

After playing around with this more today, it appears that the issue is with a change in Alpine 3.14. I found that via this issue.

I was able to solve it by updating Docker Desktop. On a remote server, you would probably need to update docker and containerd depending on your exact setup.

The other option would be to switch to a different image that's based on Alpine 3.13.3 (the last version prior to the change). At the moment, I would probably recommend hexpm/elixir:1.12.2-erlang-24.0.3-alpine-3.13.3

@Ch4s3
Copy link

Ch4s3 commented Nov 12, 2021

Is there a good solution for this for newer hexpm/elixir versions which use a newer version of alpine?

@abdul-hamid-achik
Copy link

for me what worked was to add this:

RUN apk --no-cache add git make gcc erlang-dev libc-dev

to the docker image

@abdul-hamid-achik
Copy link

specifically i think it was libc-dev

@mazz
Copy link

mazz commented Apr 21, 2023

specifically i think it was libc-dev

You totally saved my butt. I thought I'd never be able to upgrade from my old configuration, but it was this tip that helped me. Thanks!

@riverrun
Copy link
Owner

riverrun commented Oct 4, 2024

Closing this issue. If anyone feels like reopening, please let me know.

@riverrun riverrun closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants