This worked for me:
sudo xcode-select -switch /
Have you run:
xcode-select --install
To install the Xcode Developer tools?
I was having this issue on MacOS Mojave(10.14.1). Installing latest ruby via Homebrew and setting some env variables solved it for me:
(copied from brew info ruby
instructions)
export PATH="/usr/local/opt/ruby/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
I ran into this same problem on Ubuntu 18.04. The fix on Ubuntu was to install the ubuntu-dev-tools
package:
$ sudo apt-get install ubuntu-dev-tools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With