certifi / erlang-certifi

SSL Certificates for Erlang
Other
131 stars 33 forks source link

Compile failed #38

Closed idfumg closed 5 years ago

idfumg commented 5 years ago

[12.04.2019] Hello, guys! I am new to the Elixir and I trying to just add some dependencies and run my mix project. I thought that Elixir has everything for easy and convenient development. But I stuck with dependency errors for hours. Everything I do what the official https://hex.pm/packages/certifi site says. In the mix.exs file I have:

defp deps do
    [
      {:certifi, "~> 2.5"},
    ]
end

Than I run:

rm -fr _build deps mix.lock
$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
New:
  certifi 2.5.1
  parse_trans 3.3.0
* Getting parse_trans (Hex package)
* Getting certifi (Hex package)
$ mix deps.compile
==> parse_trans (compile)
Compiled src/parse_trans.erl
Compiled src/parse_trans_pp.erl
Compiled src/parse_trans_codegen.erl
Compiled src/parse_trans_mod.erl
Compiled src/ct_expand.erl
Compiled src/exprecs.erl
WARN:  /Dropbox/Dropbox/sync/Development/languages/elixir/issues/_build/dev/lib/parse_trans/ebin/parse_trans.app has version "3.3.0"; requested regex was ~>3.3
==> certifi (compile)
WARN:  /Dropbox/Dropbox/sync/Development/languages/elixir/issues/_build/dev/lib/parse_trans/ebin/parse_trans.app has version "3.3.0"; requested regex was ~>3.3
Dependency not available: parse_trans-~>3.3 (undefined)
ERROR: compile failed while processing /Dropbox/Dropbox/sync/Development/languages/elixir/issues/deps/certifi: rebar_abort
** (Mix) Could not compile dependency certifi, /usr/bin/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile certifi

As the mix says, there is no parse_trans-~>3.3, but right before It says that the parse_trans compiled successfully. It seems weird to me and not logical.

Guys, what do I wrong? Need I some specific sacral knowledge for working with it? Where I can read/ask for it? May be there are some rules how to fix problems like this?

Thank you for any help.

[13.04.2019] News. I tried to compile the certifi github version and everything was successful.

defp deps do
    [
      # {:certifi, "~> 2.5"},
      {:certifi, git: "https://github.com/certifi/erlang-certifi.git", tag: "2.5.1"},
    ]
end

So, I can suggest that hex version is broken. When I try to install httpoison ion my mix project config file (which depends on certifi) I got the same error, but about certifi. I really don't know what to do. :(

idfumg commented 5 years ago

Update. I found the solution. It is not related to the certifi package. It is not related to some package dependency issues. And you can not understand the problem from the mix or hex output messages. The problem was in versions of erlang & elixir which installed on Ubuntu by default. They do not work with last hex packages. All you need when working with the ecosystem is manually install everything from: https://elixir-lang.org/install.html#distributions

benoitc commented 5 years ago

thanks for the feedback!