hermes - 💡(How to fix) Fix brew upgrade breaks certifi (cacert.pem missing in venv) - Feishu/Telegram/WeChat all fail

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /opt/homebrew/Cellar/hermes-agent/2026.5.16/libexec/lib/python3.14/site-packages/certifi/cacert.pem

Root Cause

The homebrew formula creates a venv with --system-site-packages, but the old formula revision (2026.5.16) had a broken certifi installation inside the venv. The cacert.pem file was either missing or a broken symlink.

The error from gateway.log:

OSError: Could not find a suitable TLS CA certificate bundle, invalid path:
/opt/homebrew/Cellar/hermes-agent/2026.5.16/libexec/lib/python3.14/site-packages/certifi/cacert.pem

This affects all platforms that use lark_oapi (Feishu), requests (Telegram), etc. for TLS connections.

Fix Action

Workaround

brew reinstall hermes-agent
hermes gateway start

The reinstall (2026.5.16_1) fixed the issue by properly excluding certifi from the venv, allowing fallback to the system certifi.

Code Example

OSError: Could not find a suitable TLS CA certificate bundle, invalid path:
/opt/homebrew/Cellar/hermes-agent/2026.5.16/libexec/lib/python3.14/site-packages/certifi/cacert.pem

---

depends_on "certifi" => :no_linkage
pypi_packages exclude_packages: %w[certifi cryptography pydantic]

---

cacert.pem../../../../../../../etc/ca-certificates/cert.pem

---

brew reinstall hermes-agent
hermes gateway start
RAW_BUFFERClick to expand / collapse

Problem

After brew upgrade hermes-agent, the gateway fails to send messages on all platforms (Feishu, Telegram, WeChat) due to a missing TLS CA certificate bundle.

Root Cause

The homebrew formula creates a venv with --system-site-packages, but the old formula revision (2026.5.16) had a broken certifi installation inside the venv. The cacert.pem file was either missing or a broken symlink.

The error from gateway.log:

OSError: Could not find a suitable TLS CA certificate bundle, invalid path:
/opt/homebrew/Cellar/hermes-agent/2026.5.16/libexec/lib/python3.14/site-packages/certifi/cacert.pem

This affects all platforms that use lark_oapi (Feishu), requests (Telegram), etc. for TLS connections.

Current Formula

depends_on "certifi" => :no_linkage
pypi_packages exclude_packages: %w[certifi cryptography pydantic]

The formula excludes certifi from PyPI installation AND marks it :no_linkage. The venv has include-system-site-packages = true, so system certifi should be importable. However, the system certifi's cacert.pem is a symlink:

cacert.pem ⇒ ../../../../../../../etc/ca-certificates/cert.pem

This symlink resolves to /opt/homebrew/etc/ca-certificates/cert.pem which exists on the current system, but may not exist on all installations.

Workaround

brew reinstall hermes-agent
hermes gateway start

The reinstall (2026.5.16_1) fixed the issue by properly excluding certifi from the venv, allowing fallback to the system certifi.

Suggested Fix

In the formula's install method, ensure certifi is properly available in the venv. Either:

  1. Remove :no_linkage to let brew link certifi into the venv's site-packages
  2. Add a post_install step that copies/symlinks the system CA bundle into the venv's certifi directory
  3. Set REQUESTS_CA_BUNDLE or SSL_CERT_FILE in the formula's env wrapper

Environment

  • macOS (Darwin 25.5.0, arm64)
  • hermes-agent: 2026.5.16 → 2026.5.16_1
  • Python: 3.14.5
  • certifi (brew): 2026.4.22

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix brew upgrade breaks certifi (cacert.pem missing in venv) - Feishu/Telegram/WeChat all fail