Problem installing on 10.9.4
Closed this issue ยท 6 comments
Hi there,
Was very excited to try this out but i encountered an error installing it on my week-old macbook pro, i7 running 10.9.4. I've never used ruby before so I appologize if I'm missing something but I ran sudo gem install iStats and this was the error:
Fetching: sparkr-0.4.1.gem (100%)
Successfully installed sparkr-0.4.1
Fetching: iStats-0.0.9.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing iStats:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/iStats-0.0.9 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/iStats-0.0.9/ext/osx_stats/gem_make.out
Here's the contents of said log file:
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
(not sure if this is the correct place to post this :S appologies if this is not the case)
The issue was solved by installing xcode tools
$ xcode-select --install
Accepting the xcode licence
$ xcodebuild --license
and running the fix outlined in the readme
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats
The software works brilliantly, thank you developers for doing such a great job! :D
I thought this was fixed after 10.9.3. Thanks for posting the solution I'll take a look shortly see if I can find a permanent fix.
the issue is still not fixed, just got the same problem, and fixed with installation of additional component
El Capitane 11
This issue still exists on macOS Sierra 10.12.6 but the fix below still works:
$ xcode-select --install
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats
Ran into the same issue on High Sierra, but following @derwentx's advice solved the problem for me. Not sure if it was a typo, or if things have changed since 2014, but xcodebuild --license
wasn't a valid command on my machine. I ended up doing the following:
$ xcode-select --install
$ xcodebuild -license
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats
Note the second command uses a single hyphen, not two.
No go in Mojave. I have ruby, xcode, it halts "make failed, exit code 2"