简体   繁体   中英

Ruby 2.3.8 installation fails on MacOS with rbenv as it is showing build failure while installing openssl

I have macos monterey M1 pro chip, and while installing the ruby version 2.3.8 through rbenv it is failing as it is showing a build error while installing OpenSSL.

 % rbenv install 2.3.8 To follow progress, use 'tail -f /var/folders/qm/hl42kf3n21l484mj_trgmn_40000gq/T/ruby-build.20220902142349.96411.log' or pass --verbose Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... BUILD FAILED (macOS 12.5 using ruby-build 20220825) Inspect or clean up the working tree at /var/folders/qm/hl42kf3n21l484mj_trgmn_40000gq/T/ruby-build.20220902142349.96411.dXy6dR Results logged to /var/folders/qm/hl42kf3n21l484mj_trgmn_40000gq/T/ruby-build.20220902142349.96411.log Last 10 log lines: _dgram_write in libcrypto.a(bss_dgram.o) _RAND_query_egd_bytes in libcrypto.a(rand_egd.o)... ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[4]: *** [link_a.darwin] Error 1 make[3]: *** [do_darwin-shared] Error 2 make[2]: *** [libcrypto.1.0.0.dylib] Error 2 make[1]: *** [shared] Error 2 make: *** [build_crypto] Error 1

I have tried the solution posted in this stackoverflow link, but there is no Binutils present in my homebrew so it didn't help. I have searched on the internet a lot and couldn't able to find any possible solution. I pasted the exact error and logs. Let me know if anyone faced this same issue before?

RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.3.8

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM