tjhanley

tjhanley

Installing Elixir on Centos 7 - Mix.Error: Could not decode public key

I am trying to install elixir on our Centos 7 build agents.

I’ve installed erlang 19

$ erl
Erlang/OTP 19 [erts-8.1] [source-77fb4f8] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.1  (abort with ^G)
1>

I’ve pulled the tar for 1.4.2 from github. When I run
make clean test

This is the output I am getting.

  1) test installs public keys (Mix.Tasks.Local.PublicKeysTest)
     test/mix/tasks/local.public_keys_test.exs:31
     ** (Mix.Error) Could not decode public key: /home/tomha/elixir-1.4.2/lib/mix/tmp/sample.pub. The public key contents are shown below.

     -----BEGIN PUBLIC KEY-----
     MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmlRL//AgfszL2vkk7G3K
     t+vrI2d3aG+fGD4BZ1k1Qd/mS0EoDNfDQCpqtLzdM7oOjtu0BNCBvG3HC0tlAU92
     i3EFqEC7RSHNIGYrQ4g5WwGQMw8+Qp3D32esw7iRZKvtJu8IpS7l8x4KQq1QbfTh
     s+3yFOQyytnY6of7w2Rv37WtdA3wKAIP6yPgvl8QzwxHRORX4zNcadsJOuZt3ncv
     Bq7pyQN8g2ddF86Ycep/+cU4/onnGW3zHn5pGdvuiHqxGOq+s3+UzljLyLlTCwzz
     ncYdESIw29EEIB5xTcT0Q4qRQEuDwcp8/fASTZ7c6lv8AfpRKb69tGWLoXcx/V9P
     dQIDAQAB
     -----END PUBLIC KEY-----


     Public keys must be valid and be in the PEM format

     stacktrace:
       (mix) lib/mix.ex:276: Mix.raise/1
       (mix) lib/mix/tasks/local.public_keys.ex:63: Mix.Tasks.Local.PublicKeys.install/2
       test/mix/tasks/local.public_keys_test.exs:36: (test)

....................................................................................................................................................................................................................................

  2) test select correct versions from csv (Mix.LocalTest)
     test/mix/local_test.exs:80
     ** (Mix.Error) Could not decode public key: in-memory public key for Elixir v1.4.2. The public key contents are shown below.

     -----BEGIN PUBLIC KEY-----
     MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslPz1mAfyAvRv8W8xOdv
     HQMbDJkDKfRhsL4JBGwGH7qw0xh+TbaUlNaM3pF+i8VUjS/4FeXjT/OAUEAHu5Y2
     rBVlx00QcH8Dpbyf+H73XiCs0MXnTSecqDgzx6i6NMi8knklHT7yHySHtuuPmPuN
     Po8QTKolCKftwPE/iNDeyZfwufd+hTCoCQdoTVcB01SElfNtvKRtoKbx35q80IPr
     rOcGsALmr58+bWqCTY/51kFeRxzrPJ5LdcLU/AebyWddD4IUfPDxk16jTiCagMWA
     JPSwo8NUrWDIBbD+rEUp06y0ek276rG5Tzm/3Bma56RN/u6nAqBTBE8F2Hu2QBKj
     lQIDAQAB
     -----END PUBLIC KEY-----


     Public keys must be valid and be in the PEM format

     stacktrace:
       (mix) lib/mix.ex:276: Mix.raise/1
       (mix) lib/mix/public_key.ex:56: anonymous fn/4 in Mix.PublicKey.verify/3
       (elixir) lib/enum.ex:2732: Enum.do_any?/2
       (mix) lib/mix/local.ex:125: Mix.Local.find_matching_versions_from_signed_csv!/2
       test/mix/local_test.exs:86: anonymous fn/0 in Mix.LocalTest.test select correct versions from csv/1
       (elixir) lib/file.ex:1162: File.cd!/2
       test/mix/local_test.exs:81: (test)

..................

Finished in 91.4 seconds (6.0s on load, 85.4s on tests)
405 tests, 2 failures

Randomized with seed 941253
make: *** [test_mix] Error 1

Most Liked

tjhanley

tjhanley

Interesting… it seems like yum install erlang-19.3* installs a bad package. If I do yum install esl-erlang-19.3 things are happier.

ChaseGilliam

ChaseGilliam

You should use the erlang solutions erlang install and build elixir from source on CentOS, imho. Try this set of instructions

tjhanley

tjhanley

more specific

Installed Packages
erlang.x86_64                                                       19.3-1.el7.centos

It looks like something may be broken with ssl or crypto?

$ mix
Could not find Hex, which is needed to build dependency :loki
Shall I install Hex? (if running non-interactively, use: "mix local.hex --force") [Yn]

22:30:42.441 [info]  Application crypto exited: :stopped
** (MatchError) no match of right hand side value: {:error, {:asn1, {'no such file or directory', 'asn1.app'}}}
    (mix) lib/mix/utils.ex:432: Mix.Utils.read_httpc/1
    (mix) lib/mix/utils.ex:376: Mix.Utils.read_path/2
    (mix) lib/mix/local.ex:139: Mix.Local.read_path!/2
    (mix) lib/mix/local.ex:118: Mix.Local.find_matching_versions_from_signed_csv!/2
    (mix) lib/mix/tasks/local.hex.ex:29: Mix.Tasks.Local.Hex.run/1
    (mix) lib/mix/dep/loader.ex:143: Mix.Dep.Loader.with_scm_and_app/4
    (mix) lib/mix/dep/loader.ex:99: Mix.Dep.Loader.to_dep/3
    (elixir) lib/enum.ex:1229: Enum."-map/2-lists^map/1-0-"/2

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
yawaramin
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function: -dialyzer...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement