Skip to main content

Posts

Showing posts with the label Bash

Fixing 'command not found: brew' on Apple Silicon Macs: Configuring Your PATH

  You run the official Homebrew installation script, wait for the download to complete, and see the "Installation successful!" message. You type   brew install node , press enter, and immediately hit a wall:   zsh: command not found: brew . This is one of the most common friction points for developers setting up a new M-series machine. The system completely fails to recognize Homebrew, despite the binaries existing on your solid-state drive. Resolving the  command not found brew macOS  error requires a straightforward but manual adjustment to your shell configuration file. Why Apple Silicon Breaks the Default Homebrew Path To understand the fix, you must understand how Unix-based systems locate executable files. When you type a command like  brew , your shell (Zsh, by default on modern macOS) scans a specific list of directories defined by the  $PATH  environment variable. Historically, on Intel-based Macs, Homebrew installed itself into the ...

Solved: 'dial tcp 127.0.0.1:11434: connect: connection refused' in Ollama

  You have successfully installed Ollama. You can verify it works by running   ollama run llama3   in your terminal. You then spin up a UI like Open WebUI or a custom Docker container to interact with your models, but the connection fails immediately. The logs display a fatal networking error:  dial tcp 127.0.0.1:11434: connect: connection refused . This guide resolves this specific networking blockage. It addresses the root cause of Docker interface isolation and Ollama's default binding security policies. The Root Cause: Loopback Isolation To fix this, you must understand why  localhost  is failing. When you run a command inside a Docker container,  localhost  (or  127.0.0.1 ) refers to the  container itself , not your host machine (your laptop or server). If Ollama is running on your host OS (Mac, Windows, or Linux) and your application is running inside a Docker container, the application is trying to find Ollama  inside  t...