애플 맥북 M1에서 rvm 설치시 에러

rails·2021년 8월 30일
0

시행착오

목록 보기
1/7

애플 OSX를 사용 하는 macbook에서 일반적으로 루비를 사용 하기 위해서 설치하는 rvm (루비 버전 매니저)의 커맨드는 아래와 같다.

brew install rvm

하지만 m1프로세서를 사용한 맥북에서는 아래같은 에러가 발생 하며 진행 되지 않았다.

Downloading ruby-2.7.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2
Installing ruby-2.7.2...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 11.1 using ruby-build 20201221)

Inspect or clean up the working tree at /var/folders/z1/dm8dx54j1dlgxk4zrq__x22r0000gn/T/ruby-build.20201221160748.90156.i6p4m0
Results logged to /var/folders/z1/dm8dx54j1dlgxk4zrq__x22r0000gn/T/ruby-build.20201221160748.90156.log

Last 10 log lines:
installing default nkf libraries
compiling date_strftime.c
installing default console libraries
linking shared-object objspace.bundle
compiling date_strptime.c
linking shared-object io/nonblock.bundle
linking shared-object io/console.bundle
linking shared-object nkf.bundle
linking shared-object date_core.bundle
make: *** [build-ext] Error 2

or

Downloading ruby-2.7.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2
Installing ruby-2.7.2...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 11.1 using ruby-build 20201221)

Inspect or clean up the working tree at /var/folders/z1/dm8dx54j1dlgxk4zrq__x22r0000gn/T/ruby-build.20201221160748.90156.i6p4m0
Results logged to /var/folders/z1/dm8dx54j1dlgxk4zrq__x22r0000gn/T/ruby-build.20201221160748.90156.log

Last 10 log lines:
installing default nkf libraries
compiling date_strftime.c
installing default console libraries
linking shared-object objspace.bundle
compiling date_strptime.c
linking shared-object io/nonblock.bundle
linking shared-object io/console.bundle
linking shared-object nkf.bundle
linking shared-object date_core.bundle
make: *** [build-ext] Error 2

터미널에서 아래 명령어로 환경 변수 설정 후 해결 되었다.

export optflags="-Wno-error=implicit-function-declaration"
profile
rails

0개의 댓글