student@ubuntu:~$
Guide All

Dev Environment Troubleshooting

Fix common setup issues — SSH failures, compilation errors, missing tools, PATH problems, and more

Your terminal should just work. When it does not, this page has the fix.

Problems are listed by frequency. The top section covers what students hit most often.


Recurring issues

You will see these throughout the quarter.


VPN not connected → SSH times out

Symptom: ssh hangs for 30 seconds, then:

ssh: connect to host ... port 22: Operation timed out

or:

ssh: connect to host ... port 22: Network is unreachable

Fix: Connect to the GlobalProtect VPN first. The lab server is on the campus network — no VPN, no connection.

  1. Open GlobalProtect
  2. Portal: vpn.ewu.edu
  3. Sign in with your EWU credentials
  4. Wait for Connected status, then retry SSH

See EWU VPN Setup.


“Permission denied” when SSHing to the server

Symptom:

Permission denied, please try again.

Causes (in order of likelihood):

  1. Wrong password — you are typing your EWU password. It is the same one you use for Canvas.
  2. Wrong username — your SSH username is your EWU username (e.g. jdoner42), not your email.
  3. Caps Lock is on — passwords are case-sensitive.
  4. Account not provisioned — contact the instructor if you have never logged in before.

Note: When typing your password at the Password: prompt, nothing appears on screen — no dots, no asterisks, no cursor movement. This is normal. Type your password and press Enter.


Stuck in vim or nano

vim: If you accidentally opened vim and cannot exit:

  1. Press Esc (maybe twice)
  2. Type :q! and press Enter

That quits without saving. If you want to save first: Esc, then :wq, then Enter.

Reference: Vim Quick Reference

nano: The shortcuts are listed at the bottom of the screen. ^X means Ctrl+X (exit). It will ask if you want to save.

Reference: GNU nano documentation


Compilation error: “No such file or directory” for a header

Symptom:

fatal error: stdio.h: No such file or directory

or any .h file not found.

Causes:

  • macOS: Command Line Tools are not installed. See CLT section below.
  • Linux/server: Missing development headers. Ask the instructor — the server should have these pre-installed.

“command not found” for gcc, make, or git

macOS:

xcode-select --install

This installs Apple’s Command Line Tools which include gcc, git, make, and more. See detailed CLT fix below.

See Apple: Xcode Resources (scroll to “Command Line Tools”).

Linux:

sudo apt update && sudo apt install build-essential git

Windows: These tools run on the server, not your laptop. SSH in first.


File not found — wrong directory

Symptom: You created a file but gcc or cat says it does not exist.

Fix: Check where you are and where the file actually is:

pwd                    # Where am I?
ls                     # What's here?
find . -name "*.c"     # Where are my .c files?

The most common mistake: you created the file in your home directory (~) but you are now in a subdirectory, or vice versa.


Copy-paste does not work in my terminal

Platform Copy Paste
macOS Terminal Cmd+C Cmd+V
Windows Terminal / PowerShell Select text, Ctrl+C Right-click or Ctrl+V
PuTTY Select text (auto-copies) Right-click
Linux terminal Ctrl+Shift+C Ctrl+Shift+V

Warning: On Linux and some Windows terminals, Ctrl+C does not copy — it sends an interrupt signal that kills the running program. Use Ctrl+Shift+C to copy.


git push rejected — password authentication removed

Symptom:

remote: Support for password authentication was removed on August 13, 2021.

Why: GitHub requires SSH keys or tokens now, not passwords.

Fix — SSH key (recommended):

ssh-keygen -t ed25519 -C "your_email@ewu.edu"
# Press Enter for all prompts (default location, no passphrase is fine for now)

cat ~/.ssh/id_ed25519.pub
# Copy this entire line of output

Go to github.com/settings/keysNew SSH key → paste → Add SSH key.

Then switch your repo to use SSH:

git remote set-url origin git@github.com:YOUR_USERNAME/YOUR_REPO.git

Reference: Generate SSH key, Add key to GitHub


git push rejected — “Updates were rejected”

Symptom:

! [rejected]  main -> main (non-fast-forward)
hint: Updates were rejected because the remote contains work that you do not have locally.

Why: Someone (or you, from another machine) pushed changes you do not have yet.

Fix:

git pull --rebase origin main
# Then retry:
git push origin main

Reference: Dealing with non-fast-forward errors


Accidentally deleted a file or made a bad edit

If the file is in a git repo (it should be):

# See what changed
git status
git diff

# Undo changes to a specific file (revert to last commit)
git checkout -- filename.c

# Undo ALL uncommitted changes (careful!)
git checkout -- .

If the file is NOT in git: It is gone. This is why we use version control.

Reference: Git Basics — Undoing things


First-time setup

These come up once when you first configure your machine. Fix them and move on.


SSH not working on Windows

Symptom:

'ssh' is not recognized as an internal or external command

Fix: Enable the built-in OpenSSH Client:

  1. Open SettingsAppsOptional Features
  2. Click Add a feature
  3. Search for OpenSSH Client → click Install
  4. Open a new PowerShell window (not the same one)

Verify: ssh -V

Reference: Microsoft: OpenSSH for Windows


Which terminal should I use on Windows?

Terminal Notes
Windows Terminal Recommended. Tabs, good copy-paste, SSH built in.
PowerShell Fine. SSH built in since Windows 10.
Command Prompt (cmd.exe) Works but no tabs, weaker copy-paste.
Git Bash Avoid for SSH — breaks nano, vim, and interactive programs.

Reference: Install Windows Terminal


Command Line Tools missing or outdated (macOS)

Symptom: Running brew install, gcc, git, or make gives:

xcode-select: note: No developer tools were found, requesting install.

or:

Error: Your Command Line Tools are too outdated.

Fix — try these in order:

Method 1 — GUI prompt:

xcode-select --install

A macOS dialog appears. Click Install, wait for the download.

Method 2 — if the dialog never appears, install via command line:

softwareupdate --list
# Find the label like: "Command Line Tools for Xcode-26.4"
sudo softwareupdate --install "Command Line Tools for Xcode-26.4"

Method 3 — if tools are corrupted, remove and reinstall:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
# If dialog still fails, use Method 2

Verify:

xcode-select -p
# Expected: /Library/Developer/CommandLineTools

gcc --version
# Expected: Apple clang version XX.X.X ...

Reference: Apple Xcode Resources, Homebrew macOS Requirements


Homebrew not installed (macOS)

Symptom: zsh: command not found: brew

Fix:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Critical: After the install finishes, read the output. It prints two commands to add Homebrew to your PATH. They look like:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Run both. Then verify: brew --version

Reference: Homebrew Installation


brew disappears after restarting terminal

Symptom: brew worked before, now zsh: command not found: brew

Why: Homebrew’s PATH setup is in ~/.zprofile (login shell only). Some terminals open non-login shells.

Fix:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc

Reference: Homebrew FAQ


brew install fails — “Command Line Tools are too outdated”

This blocks any brew package that needs compiling. Fix the Command Line Tools first (see above), then retry the brew install.


git not installed

macOS: xcode-select --install (installs git along with CLTs)

Windows: Download from git-scm.com/download/win. Use default options. Restart terminal.

Linux: sudo apt update && sudo apt install git

Reference: Installing Git


python or pip not found on Windows

Symptom: 'python' is not recognized as an internal or external command

Fix: Install from python.org/downloads. Critical: check “Add python.exe to PATH” during installation.

Already installed without the checkbox?

  1. SettingsAppsInstalled apps → find Python → Modify
  2. Check “Add Python to environment variables”
  3. Restart your terminal

Reference: Python on Windows


sudo apt install fails — “Unable to locate package” (Linux)

Your package list is stale. Update it first:

sudo apt update
sudo apt install <package-name>

gcc or make not found on Linux

sudo apt install build-essential

This installs gcc, g++, make, and standard C headers.


Password prompt shows nothing when I type

This is on purpose. When any command asks for a password (SSH, sudo, installers), the terminal hides your input. No dots, no asterisks, no cursor movement. Type your password and press Enter.

If you get Sorry, try again — you typed it wrong. Try again slowly.


“Permission denied” or “Operation not permitted” running an installer

If it asks for a password: It wants your Mac login password (the one that unlocks your laptop). See above about invisible password prompts.

If you get “Operation not permitted”: You probably need sudo:

sudo <your-command>

If sudo still fails: macOS System Integrity Protection (SIP) is blocking writes to protected system directories. This is intentional — do not disable SIP. Install to a user-writable location or use Homebrew.

Reference: About System Integrity Protection


Windows Defender blocks a developer tool download

Some antivirus programs flag installers as suspicious.

Fix: Temporarily disable real-time protection in Windows SecurityVirus & threat protectionManage settings → toggle off Real-time protection. Install the tool, then toggle it back on.

Reference: Windows Defender settings


Optional tools and edge cases

Less common issues. Refer here if your problem is not covered above.


Newly installed tool not found — PATH issue

Symptom (any OS):

zsh: command not found: opencode

(or any tool you just installed)

Why: The installer updated your shell config (.zshrc, .bashrc, etc.) but your current terminal session has not re-read it.

Fix:

# Reload your shell config
source ~/.zshrc    # macOS/Linux with zsh
source ~/.bashrc   # Linux with bash

# Or: just open a brand new terminal window

If the tool is still missing, find where it was installed and add it manually:

# Search for it
find ~ -name "opencode" -type f 2>/dev/null | head -5
which opencode 2>/dev/null

# Add its directory to PATH (adjust the path to match what you found)
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Installing OpenCode

Two install methods — either works:

Method A — Homebrew (macOS, if brew is already set up):

brew install anomalyco/tap/opencode

Method B — curl installer (macOS/Linux, works even without Homebrew):

curl -fsSL https://opencode.ai/install | bash

Verify: opencode --version

If command not found, see the PATH fix above.

Reference: OpenCode documentation


SSH key already exists — overwrite warning

Symptom when running ssh-keygen:

/Users/you/.ssh/id_ed25519 already exists.
Overwrite (y/n)?

Answer: Press n. You already have a key. To see it:

cat ~/.ssh/id_ed25519.pub

Copy that line and add it to github.com/settings/keys if it is not there already.

Reference: Check for existing SSH keys


Multiple Python versions / python vs python3

On some systems, python points to Python 2 (or nothing) while python3 is what you want.

python3 --version   # This is usually the right one
pip3 install <pkg>  # Use pip3 to match

macOS Gatekeeper blocks an app — “unidentified developer”

Symptom: A popup says the app “can’t be opened because it is from an unidentified developer.”

Fix: Right-click (or Control-click) the app → select Open → click Open in the dialog. This adds a one-time exception. Do not disable Gatekeeper system-wide.

Reference: Safely open apps on Mac


Homebrew “Your Xcode is outdated” vs “Your CLTs are outdated”

These are different messages:

Message Meaning Fix
Command Line Tools are too outdated The lightweight dev tools need updating CLT fix above
Your Xcode is outdated Full Xcode.app (if installed) needs updating Update Xcode from the Mac App Store, or just use CLTs

If you only have CLTs (not full Xcode), and brew complains about Xcode specifically:

sudo xcode-select --switch /Library/Developer/CommandLineTools

This tells the system to use CLTs instead of looking for Xcode.app.

Reference: Homebrew macOS Requirements


Still stuck?

  1. Copy the exact error message — the whole thing, not a summary
  2. Post it in the class Discord #tech-help channel with:
    • Your operating system (macOS, Windows, Linux)
    • What you were trying to do
    • The full command you ran
    • The full error output (screenshot is fine)

Reference documentation: