본문으로 바로가기
homeimage
  1. Home
  2. 컴퓨터/애플
  3. zsh: parse error near `)' 에러 해결 방법

zsh: parse error near `)' 에러 해결 방법

· 댓글개 · 바다야크

맥에서 brew를 설치했는데요, 마지막에 설명에 따라 echo 명령행을 그대로 복사해서 실행하려 했지만, 자꾸 zsh: parse error near `)' 에러 메시지가 출력되네요. 분명히 다음 단계를 따르라는 내용을 그대로 복사해서 실행했는데 말이죠.

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

~ % echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile
zsh: parse error near `)'
~ % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile 
zsh: parse error near `)'
~ %

그런데 가반 보니 괄호 하나가 잘못되었네요.

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

괄호 하나가 더 있는 것이죠. 그래서 그 괄호를 제거하고 실행하니 제대로 실행되었습니다.

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

~ % echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile
zsh: parse error near `)'
~ % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/badayak/.zprofile 
zsh: parse error near `)'
~ % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/badayak/.zprofile 
~ % eval "$(/opt/homebrew/bin/brew shellenv)"
~ % brew
Example usage:

맥OS에 기본으로 터미널이 설치되어 있는 것을 보면 유닉스는 유닉스구나 하는 생각이 들면서 화려한 GUI 인터페이스를 제공하는 맥OS가 터미널도 자주 애용한다는 것이 뭔가 서먹해 보이면서도 재미있습니다. 만일 윈도우도 유닉스 계열이었다면 하는 생각도 해봅니다.

SNS 공유하기
💬 댓글 개
최근글
이모티콘창 닫기
울음
안녕
감사해요
당황
피폐

이모티콘을 클릭하면 댓글창에 입력됩니다.