tobytripp

tobytripp

Hi there, I’m trying to get started with Nerves but I get an error on the final step of the installation process.

I’m on an M1 Mac,
Elixir 1.15.1
Erlang 26.0.2

When I try to install nerves_bootstrap, the following is the result:

$ mix archive.install hex nerves_bootstrap
Resolving Hex dependencies…
Resolution completed in 0.019s
New:
nerves_bootstrap 1.11.5

  • Getting nerves_bootstrap (Hex package)
    All dependencies are up to date
    Compiling 12 files (.ex)

== Compilation error in file lib/attic/env.ex ==
** (ArgumentError) could not call Module.put_attribute/3 because the module Nerves.Bootstrap.Aliases is in read-only mode (@after_compile)
(elixir 1.15.1) lib/module.ex:2305: Module.assert_not_readonly!/2
(elixir 1.15.1) lib/module.ex:2007: Module.put_attribute/5
lib/attic/env.ex:2: (module)

Any ideas?

Showing Posts 19 to 10

tobytripp

tobytripp OP

That seems to have worked, thanks! At least, it ran without error.

Thanks again!

jjcarstens

jjcarstens

Nerves Core Team

@tobytripp Can you try the newly released nerves_boostrap v1.12.1? It completely removes the legacy tasks that are showing in your failure traces here so I’m hopeful it fixes things for you

tobytripp

tobytripp OP

Oops. Forgot to do it in an empty directory. Let me try again…

Hm, looks like it might be an ssl error?

mix archive.install github nerves-project/nerves_bootstrap branch support-nerves-1.8-and-later

* Getting new package (https://github.com/nerves-project/nerves_bootstrap.git - origin/support-nerves-1.8-and-later)
remote: Enumerating objects: 2883, done.
remote: Counting objects: 100% (262/262), done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 2883 (delta 157), reused 193 (delta 136), pack-reused 2621

16:35:33.356 [notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:format_warning, 1}
            (elixir 1.15.4) src/elixir_def.erl:134: :elixir_def.store_definition/3
            (ssl 11.0.2) ssl_app.erl:47: :ssl_app.start_logger/0
            (ssl 11.0.2) ssl_app.erl:32: :ssl_app.start/2
            (kernel 9.0.2) application_master.erl:293: :application_master.start_it_old/4

16:35:33.366 [notice] Application public_key exited: :stopped

16:35:33.366 [notice] Application asn1 exited: :stopped
==> nerves_bootstrap

16:35:33.366 [notice] Application crypto exited: :stopped
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
** (MatchError) no match of right hand side value: {:error, {:ssl, {:bad_return, {{:ssl_app, :start, [:normal, []]}, {:EXIT, {{:badmatch, {:format_warning, 1}}, [{:elixir_def, :store_definition, 3, [file: ~c"src/elixir_def.erl", line: 134]}, {:ssl_app, :start_logger, 0, [file: ~c"ssl_app.erl", line: 47]}, {:ssl_app, :start, 2, [file: ~c"ssl_app.erl", line: 32]}, {:application_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
    (hex 2.0.6) lib/hex.ex:5: Hex.start/0
    (mix 1.15.4) lib/mix/hex.ex:60: Mix.Hex.start/0
    (mix 1.15.4) lib/mix/dep/loader.ex:189: Mix.Dep.Loader.with_scm_and_app/5
    (mix 1.15.4) lib/mix/dep/loader.ex:141: Mix.Dep.Loader.to_dep/4
    (elixir 1.15.4) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
    (mix 1.15.4) lib/mix/dep/loader.ex:364: Mix.Dep.Loader.mix_children/3
    (mix 1.15.4) lib/mix/dep/loader.ex:317: anonymous fn/5 in Mix.Dep.Loader.mix_dep/3
    (mix 1.15.4) lib/mix/project.ex:458: Mix.Project.in_project/4
fhunleth

fhunleth

Co-author of Nerves

What’s Blinker.MixProject? That sounds like the problem.

tobytripp

tobytripp OP

✗ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
tobytripp

tobytripp OP

✗ mix archive.install github nerves-project/nerves_bootstrap branch support-nerves-1.8-and-later

Error while loading project :mix_local_installer at /private/var/folders/q0/5bh7by3s5ydfxx6pslz3z9vc0000gn/T/mix-local-installer-fetcher-wHyuNA
** (ArgumentError) could not call Module.put_attribute/3 because the module Blinker.MixProject is already compiled
    (elixir 1.15.4) lib/module.ex:2310: Module.assert_not_readonly!/2
    (elixir 1.15.4) lib/module.ex:2007: Module.__put_attribute__/5
    /private/var/folders/q0/5bh7by3s5ydfxx6pslz3z9vc0000gn/T/mix-local-installer-fetcher-wHyuNA/mix.exs:2: (module)
outlog

outlog

fishing, but I wonder if installing Xcode Command Line Tools is required by asdf nowadays?

maybe try xcode-select --install in terminal, and then (re)install erlang/elixir using asdf

fhunleth

fhunleth

Co-author of Nerves

Hi @tobytripp,

Sorry for the delays in responding. It seems like mid-August caught up with Jon and me.

As far as I can tell, you’re doing everything right. The error that you’re getting should have been a good hint, but I can not reproduce it. I created an issue to track it.

Could you try installing nerves_bootstrap like this and let me know if it works?

mix archive.install github nerves-project/nerves_bootstrap branch support-nerves-1.8-and-later

# If successful, try this
mix nerves.new test_project # answer y to the question
cd test_project
export MIX_TARGET=rpi0
mix deps.get
mix firmware

You won’t be able to use Nerves versions before v1.8.0, but that version is over a year old now.

Thanks for your patience with what should have been an easy step.

tobytripp

tobytripp OP

I’m in an empty directory off of $HOME

Same error. :person_shrugging:

jjcarstens

jjcarstens

Nerves Core Team

What directory are you in when running mix archive.install hex nerves_bootstrap?

Can you also try building Erlang with OpenSSL 1.1

brew install openssl@1.1
KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac --with-ssl=$(brew --prefix openssl@1.1)" asdf install Erlang 26.0.2

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews