I'm trying to install ruby@2.7.4 using rvm but have been struggling with errors for the past day. I have checked that my Xcode version is up to date (14.1) and Command Line Tools (14.1) on macOS Ventura 13.0.1.
I have rvm 1.29.12. Would appreciate any help, please let me know if more information is needed
$ rvm install "ruby-2.7.4"
Warning! PATH is not properly set up, /Users/kenjohnson/.rvm/gems/ruby-2.6.2/bin is not at first place.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-2.6.2
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
ruby-2.7.4 - #removing src/ruby-2.7.4..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.0/x86_64/ruby-2.7.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/kenjohnson/.rvm/rubies/ruby-2.7.4, this may take a while depending on your cpu(s)...
ruby-2.7.4 - #downloading ruby-2.7.4, this may take a while depending on your connection...
ruby-2.7.4 - #extracting ruby-2.7.4 to /Users/kenjohnson/.rvm/src/ruby-2.7.4.....
ruby-2.7.4 - #configuring..
Error running './configure --prefix=/Users/kenjohnson/.rvm/rubies/ruby-2.7.4 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared',
please read /Users/kenjohnson/.rvm/log/1668894405_ruby-2.7.4/configure.log
There has been an error while running configure. Halting the installation.
configure.log:
[2022-11-19 13:25:34] ./configure
current path: /Users/kenjohnson/.rvm/src/ruby-2.7.4
GEM_HOME=/Users/kenjohnson/.rvm/gems/ruby-2.6.2
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/mysql/bin:/opt/anaconda3/bin:/usr/local/sbin:/Users/kenjohnson/.pyenv/shims:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/kenjohnson/Documents/Classes/Year 4 Term 1/CPEN 322/project-Kojon74/node_modules/.bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/mysql/bin:/opt/anaconda3/bin:/usr/local/sbin:/Users/kenjohnson/.rvm/gems/ruby-2.6.2/bin:/Users/kenjohnson/.rvm/gems/ruby-2.6.2@global/bin:/Users/kenjohnson/.rvm/rubies/ruby-2.6.2/bin:/usr/local/opt/ruby/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/kenjohnson/.rvm/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
GEM_PATH=/Users/kenjohnson/.rvm/gems/ruby-2.6.2:/Users/kenjohnson/.rvm/gems/ruby-2.6.2@global
command(5): ./configure --prefix=/Users/kenjohnson/.rvm/rubies/ruby-2.7.4 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared
checking for ruby... /usr/local/opt/ruby/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin22.1.0
checking host system type... x86_64-apple-darwin22.1.0
checking target system type... x86_64-apple-darwin22.1.0
checking whether the C compiler works... no
configure: error: in `/Users/kenjohnson/.rvm/src/ruby-2.7.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
config.log: had to delete cache variables, output variables, confides.h since stack overflow was complaining about too much code
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/Users/kenjohnson/.rvm/rubies/ruby-2.7.4 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared
## --------- ##
## Platform. ##
## --------- ##
hostname = Kens-MBP-2.hitronhub.home
uname -m = x86_64
uname -r = 22.1.0
uname -s = Darwin
uname -v = Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 909 tasks, 3399 threads, 4 processors
Load average: 10.61, Mach factor: 0.63
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/opt/coreutils/bin
PATH: /usr/local/opt/pkg-config/bin
PATH: /usr/local/opt/libtool/bin
PATH: /usr/local/opt/automake/bin
PATH: /usr/local/opt/autoconf/bin
PATH: /usr/local/mysql/bin
PATH: /opt/anaconda3/bin
PATH: /usr/local/sbin
PATH: /Users/kenjohnson/.pyenv/shims
PATH: /usr/local/opt/ruby/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Users/kenjohnson/Documents/Classes/Year 4 Term 1/CPEN 322/project-Kojon74/node_modules/.bin
PATH: /opt/X11/bin
PATH: /Library/Apple/usr/bin
PATH: /Library/Frameworks/Mono.framework/Versions/Current/Commands
PATH: /usr/local/mysql/bin
PATH: /opt/anaconda3/bin
PATH: /usr/local/sbin
PATH: /Users/kenjohnson/.rvm/gems/ruby-2.6.2/bin
PATH: /Users/kenjohnson/.rvm/gems/ruby-2.6.2@global/bin
PATH: /Users/kenjohnson/.rvm/rubies/ruby-2.6.2/bin
PATH: /usr/local/opt/ruby/bin
PATH: /Applications/Visual Studio Code.app/Contents/Resources/app/bin
PATH: /Users/kenjohnson/.rvm/bin
PATH: /Applications/Visual Studio Code.app/Contents/Resources/app/bin
PATH: /Applications/Visual Studio Code.app/Contents/Resources/app/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:3017: checking for ruby
configure:3035: found /usr/local/opt/ruby/bin/ruby
configure:3048: result: /usr/local/opt/ruby/bin/ruby
configure:3121: checking build system type
configure:3135: result: x86_64-apple-darwin22.1.0
configure:3221: checking host system type
configure:3234: result: x86_64-apple-darwin22.1.0
configure:3254: checking target system type
configure:3267: result: x86_64-apple-darwin22.1.0
configure:3680: checking for C compiler version
configure:3689: gcc --version >&5
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:3700: $? = 0
configure:3689: gcc -v >&5
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:3700: $? = 0
configure:3689: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3700: $? = 1
configure:3689: gcc -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:3700: $? = 1
configure:3720: checking whether the C compiler works
configure:3742: gcc conftest.c >&5
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/lib/darwin/libclang_rt.ios.a, file is universal (armv7,armv7s,arm64,arm64e) but does not contain the x86_64 architecture: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/lib/darwin/libclang_rt.ios.a
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.1.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.1.sdk/usr/lib/libSystem.tbd (4 slices)
ld: building for iOS, but linking in object file built for iOS Simulator, file '/var/folders/s3/v3l8xgqd3xdgc1ll_pmdv1qr0000gn/T/conftest-3b5ab3.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:3746: $? = 1
configure:3784: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3789: error: in `/Users/kenjohnson/.rvm/src/ruby-2.7.4':
configure:3791: error: C compiler cannot create executables
See `config.log' for more details