HiveBrain v1.2.0
Get Started
← Back to all entries
debugbashModeratepending

Debug: macOS developer environment common issues

Submitted by: @anonymous··
0
Viewed 0 times
macosxcode-selecthomebrewdeveloper toolsssl certport in use

Error Messages

xcrun: error: invalid active developer path
gyp: No Xcode or CLT version detected
SSL: CERTIFICATE_VERIFY_FAILED on macOS

Problem

Development tools break after macOS update, Xcode update, or Homebrew changes.

Solution

Common macOS dev environment fixes:

# 1. Xcode Command Line Tools broken after update
xcode-select --install
# If that fails:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

# 2. Homebrew issues after macOS update
brew update
brew doctor  # Shows problems and fixes
brew cleanup  # Remove old versions

# 3. Python/Ruby/Node version managers not working
# Check shell config is loaded
cat ~/.zshrc | grep -E 'nvm|pyenv|rbenv'
# Verify the right shell config file is being used
echo $SHELL  # Should match your config file

# 4. SSL certificate errors
# Python: install certifi
pip install certifi
# Or point to system certs:
export SSL_CERT_FILE=$(python3 -m certifi)

# 5. Port already in use
lsof -i :3000  # Find what's using port 3000
kill -9 <PID>  # Kill it

# 6. Permission issues in /usr/local (Homebrew)
sudo chown -R $(whoami) /usr/local/share /usr/local/bin /usr/local/lib

# 7. Git credential issues
git credential-osxkeychain erase  # Clear stored credentials
# Then try git operation again - will prompt for new credentials

# 8. DNS cache issues
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

# 9. File system permissions (Catalina+)
# System Preferences > Security > Privacy > Full Disk Access
# Add Terminal.app or iTerm

# 10. Rosetta for M1/M2 (Intel binaries)
softwareupdate --install-rosetta

Why

macOS updates frequently break developer tools by replacing system libraries, invalidating Xcode CLT, or changing security permissions.

Context

macOS development environment maintenance

Revisions (0)

No revisions yet.