4

While attempting to run the command brew install mbedtls --HEAD I encountered an error:

Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory @ rb_sysopen - include/mbedtls/config.h

I inspected the homebrew formula and see that mbedtls's include/mbedtls/config.h is referenced on line 27.

I reviewed the mbedtls git repo and sure enough, the file include/mbedtls/config.h no longer exists. I searched through the commit history and can see that config.h was renamed to to mbedtls_config.h.

How do I go about manually resolving the filename error in the homebrew formula?

chart328
  • 113
  • 1
  • 6
  • 1
    I think current mbedtls --HEAD, based on 3.0.0, is broken. To return to last stable release, 2.27.0, I downloaded https://raw.githubusercontent.com/Homebrew/homebrew-core/28e9ee3afc1a4cc65ea4cc89d6e21bc0158525be/Formula/mbedtls.rb and then I installed it with `brew install ~/Downloads/mbedtls.rb`. – Cœur Jul 12 '21 at 05:27
  • 1
    https://github.com/Homebrew/homebrew-core/pull/81285 was merged a few hours ago. I was successfully able to upgrade mbedtls from 2.27.0 to 3.0.0 just now. So that problem has now resolved itself. – Cœur Jul 16 '21 at 03:56

1 Answers1

0

The answer to my original question was found using the answer from this question.

The local source for the formula can be edited using brew edit formula_name

Even with the change homebrew was still unable to complete the install, but provided more useful error messages that allowed me to locate the relevant resources:

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
mbedtls 3.0.0 https://github.com/Homebrew/homebrew-core/pull/80727
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
chart328
  • 113
  • 1
  • 6
  • 1
    This PR that you're referencing was closed without being merged. Possible new PR to follow is at https://github.com/Homebrew/homebrew-core/pull/81285 – Cœur Jul 15 '21 at 07:22