I.K.Picture & IT Info.

[Mac OS X] Maven 설치 (오류 해결) 본문

Desktop and Mobile/Apple(iOS,Mac)

[Mac OS X] Maven 설치 (오류 해결)

helpful-intruder 2020. 7. 9. 22:41
반응형

MAC OS X 에 Maven 을 설치하기 위해서는 brew 를 사용합니다.

 

그런데...

제께 이상한건지 ... 단순히 brew install maven 을 하면 오류가 나더군요...

 

Error: The following directories are not writable by your user:

/usr/local/share/man/man3

/usr/local/share/man/man5

/usr/local/share/man/man7

 

이 부분은 해당 폴더에 권한이 없어서 오류가 나는 것이니... 

아래 명령어로 이를 해결해줍니다. 

sudo chown -R $(whoami) /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7

 

그 다음에 설치하려고 하니... 또 gcc 가 없다고 오류가 아래처럼 나더군요..

Error: An exception occurred within a child process:

  CompilerSelectionError: maven cannot be built with any available compilers.

Install GNU's GCC:

  brew install gcc

 

그래서 gcc를 설치하려고 하니 또... 오류가 납니다... 아래처럼요...

$brew install gcc

Error: The following formula

  gcc

cannot be installed as binary package and must be built from source.

Install the Command Line Tools:

  xcode-select --install

 

위 오류 말대로

$xcode-select --install 을 수행하여 설치를 수행합니다.

 

그런 후 maven 을 설치하면 설치가 됩니다. 

 

순서를 정리해보면 다음과 같습니다.

 

 

$sudo chown -R $(whoami) /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7

$xcode-select --install

$brew install gcc

$brew install maven

 

반응형
Comments