1. macOS에 MongoDB를 설치하던 도중 에러가 발생했다.
brew install mongodb-community
  1. 에러 메시지
Error: An exception occurred within a child process:
  CompilerSelectionError: mongodb/brew/mongodb-database-tools cannot be built with any available compilers.
Install GNU's GCC:
  brew install gcc
  1. gcc를 설치하라고 한다.
brew install gcc
  1. 다음과 같은 에러를 보게되며 설치가 되지 않는다.
Error: gcc: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with:xcode-select --install
  1. 검색해보니 xcode의 Command Line Developer Tools를 설치해주어야 한다고 나온다.
    설치해준다.
xcode-select --install
  1. 다시 설치 시도
brew install mongodb-community

성공하였다.

  1. mongoDB services start (서비스 시작)
brew services start mongodb-community
  1. shell 실행. 다음 명령어를 입력하면 MongoDB Shell이 실행되고 직접 명령어로 MongoDB를 조작할 수 있다.
mongo

profile
늦깎이아재 FE 개발자 여름입니다 :)

0개의 댓글