theAntimon

theAntimon

Hi nerves community. I try to follow the steps to build the weather station based on nerves. But I fail pretty early while trying to build the firmware:

$ mix firmware
==> nerves
==> sensor_hub

Nerves environment
  MIX_TARGET:   rpi0
  MIX_ENV:      dev

==> nerves_ssh
Compiling 7 files (.ex)

== Compilation error in file lib/nerves_ssh/options.ex ==
** (UndefinedFunctionError) function :ssh_sftpd.subsystem_spec/1 is undefined (module :ssh_sftpd is not available)
    :ssh_sftpd.subsystem_spec([cwd: ~c"/"])
    lib/nerves_ssh/options.ex:50: (module)
could not compile dependency :nerves_ssh, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile nerves_ssh --force", update it with "mix deps.update nerves_ssh" or clean it with "mix deps.clean nerves_ssh"

Anyone having an idea what is going on here?

Showing Posts 1 to 2

fhunleth

fhunleth

Co-author of Nerves

Hi @theAntimon,

I haven’t seen this specific error, but I have a guess. The :ssh_sftpd module is provided by Erlang and I think that it may not be included if Erlang wasn’t compiled with OpenSSL support. To see if this is the case, start up IEx and see what you get from :crypto.info_lib/0:

$ iex
Erlang/OTP 26 [erts-14.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Interactive Elixir (1.15.6) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :crypto.info_lib
[{"OpenSSL", 269488511, "OpenSSL 1.1.1w  11 Sep 2023"}]

If you get an error, you’ll have to reinstall Erlang. I’d assume that OpenSSL development libraries or header files were missing when Erlang was installed, but I don’t know without more info. Hopefully this will give a clue that you can google for a next step.

A second thing to try, but please ensure that OpenSSL is definitely working before trying this, is to try my updated version of the Weather Station book code. That repository only updates the sensor_hub_poncho directory to let it be compiled with current versions of Elixir and Erlang. You can see the updates via the git commit history and they’re mostly dependency updates.

Hope this helps!

theAntimon

theAntimon OP

Thank you for your answer.

I get this:

iex(1)> :crypto.info_lib
[{"OpenSSL", 806354960, "OpenSSL 3.1.1 30 May 2023"}]

I also cloned your linked repository and tried it again but I get the same error.

But… I just removed all the erlang and elixir packages on my system and reinstalled them. And now it is working. It maybe really was because I already had Erlang installed before I installed some other dependencies. Anyway, now I’m happy :slight_smile:

Thank you!

— All posts loaded —

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
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
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
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
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
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

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