-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation failure on MacOS Ventura M1 Pro 10c/16c #606
Comments
The content of mkmf.log is:/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/clocale-0.0.4/mkmf.log ` |
Hi. According to https://stackoverflow.com/a/68118750/4432837 the Ruby version included by Apple is not really working. You have to install Ruby yourself, e.g. from homebrew -- see https://www.ruby-lang.org/en/documentation/installation/#homebrew \edit: It might also work if you install the headers with something like |
Funny thing is I resolved this issue just now and came to check if the issue was addressed yet. Figured out by myself that I was being served by MacOS's bundled ruby which are of lower version. But I had Ruby 3.2+ installed via Homebrew and I just updated the $PATH when it indicated from in the prompt after trying: So, after doing this, I had to reload .zshrc by: And then sudo gem install colorls --user-install works just fine. Also had to add /Users/lenin/.gem/ruby/3.2.0/bin to $PATH |
This is a mint upgrade from Monterey to Ventura upon unboxing the MBP. Its a 16inch M1 Pro 10core/16core.
When
sudo gem install colorls
was attempted, it gave the following error at first:`Building native extensions. This could take a while...
ERROR: Error installing colorls:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20231215-10876-ti2sgm.rb extconf.rb
checking for locale.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
'--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
block in try_compile'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
try_compile'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
block in checking_for'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
open'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
open'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
checking_for'from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
have_header' from extconf.rb:9:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/clocale-0.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/clocale-0.0.4/gem_make.out`
Then while trying the
'`sudo update_rubygems
, following error was displayed:ERROR: While executing gem ... (Errno::EPERM) Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/gem /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1387:in
initialize'/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1387:in
open' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1387:in
block in copy_file'/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in
open' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in
copy_file'/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:492:in
copy_file' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:860:in
block in install'/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1558:in
block in fu_each_src_dest' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1574:in
fu_each_src_dest0'/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1556:in
fu_each_src_dest' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:856:in
install'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:268:in
block (2 levels) in install_executables' /Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:252:in
chdir'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:252:in
block in install_executables' /Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:249:in
each'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:249:in
install_executables' /Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/commands/setup_command.rb:166:in
execute'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/command.rb:328:in
invoke_with_build_args' /Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/command_manager.rb:253:in
invoke_command'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/command_manager.rb:193:in
process_args' /Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/command_manager.rb:151:in
run'/Library/Ruby/Gems/2.6.0/gems/rubygems-update-3.4.22/lib/rubygems/gem_runner.rb:56:in
run' setup.rb:36:in
Now, after again trying
sudo gem install colorls
:Fetching colorls-1.4.6.gem Fetching rainbow-3.1.1.gem Fetching manpages-0.6.1.gem Fetching filesize-0.2.0.gem Fetching clocale-0.0.4.gem Fetching public_suffix-5.0.4.gem Fetching addressable-2.8.6.gem Fetching unicode-display_width-2.5.0.gem ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. /Library/Ruby/Site/2.6.0/rubygems/installer.rb:708:in
verify_gem_home'/Library/Ruby/Site/2.6.0/rubygems/installer.rb:898:in
pre_install_checks' /Library/Ruby/Site/2.6.0/rubygems/installer.rb:303:in
install'/Library/Ruby/Site/2.6.0/rubygems/resolver/specification.rb:105:in
install' /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:195:in
block in install'/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:183:in
each' /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:183:in
install'/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:215:in
install_gem' /Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:231:in
block in install_gems'/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:224:in
each' /Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:224:in
install_gems'/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:170:in
execute' /Library/Ruby/Site/2.6.0/rubygems/command.rb:328:in
invoke_with_build_args'/Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:253:in
invoke_command' /Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:193:in
process_args'/Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:151:in
run' /Library/Ruby/Site/2.6.0/rubygems/gem_runner.rb:56:in
run'/usr/bin/gem:21:in
<main>'
The text was updated successfully, but these errors were encountered: