에러 로그 전문

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
readline.c:1903:37: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
                                    rl_username_completion_function);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    rl_username_completion_function
readline.c:79:42: note: expanded from macro 'rl_username_completion_function'
# define rl_username_completion_function username_completion_function
                                         ^
/usr/local/opt/readline/include/readline/readline.h:494:14: note: 'rl_username_completion_function' declared here
extern char *rl_username_completion_function (const char *, int);
             ^
1 error generated.
linking shared-object fiddle.bundle
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make[1]: *** Waiting for unfinished jobs....
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
installing default ripper libraries
ld: warning: ignoring duplicate libraries: '-lffi', '-lruby.3.2'
linking shared-object rbconfig/sizeof.bundle
linking shared-object objspace.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
ripper.c:10310:9: warning: variable 'yynerrs' set but not used [-Wunused-but-set-variable]
    int yynerrs = 0;
        ^
linking shared-object date_core.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object nkf.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
1 warning generated.
linking shared-object ripper.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
make: *** [build-ext] Error 2
external command failed with status 2

해결

zshrc 파일을 열어서

1
vi ~/.zshrc

아래 설정 추가

1
export PATH=${HOME}/.rbenv/bin:${PATH} && eval "$(rbenv init -)"

저장 후 적용

1
source ~/.zshrc

아래 명령어로 rbenv 를 통한 루비 설치

1
RUBY_CONFIGURE_OPTS="--disable-install-doc --disable-shared --with-openssl-dir=$(brew --prefix openssl@3)" arch -x86_64 rbenv install 3.2.3

3.2.3 부분에는 원하는 루비 버전을 입력하면 된다.

이후 global 지정 등 문제 없이 작동함.

1
rbenv global 3.2.3

그나저나 이번 깃허브 페이지 업데이트(github-pages v229)로 인해서 빌드가 안되는 문제가 얼른 해결됐으면 좋겠다.

Reference

https://blog.yozi.kr/entry/mac%EC%97%90%EC%84%9C-ruby-%EC%9E%AC%EC%84%A4%EC%A0%95%EC%84%A4%EC%B9%98-%ED%95%98%EA%B8%B0-rbenv
https://github.com/rbenv/ruby-build/discussions/2106
(곁다리 참고)Dependency 오류 : https://archuive.tistory.com/3
(곁다리 참고)Dependency 오류 : https://tmjb.tistory.com/131