Can't find header files for Ruby on SUSE?
-
21-12-2019 - |
Question
I'm attempting to install compass on SUSE Enterprise 11 SP3. I get the following. Any ideas?
gem install compass
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
<b>mkmf.rb can't find header files for ruby at /usr/lib64/ruby/ruby.h</b>
extconf failed, exit code 1
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/ffi-1.9.3 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/extensions/x86_64-linux/1.8/ffi-1.9.3gem_make.out
Solution 2
For those with similar issues I got this working by.
Uninsalling ruby and rvm Building zlib from source with the shared option
./configure --shared
make
make install
I did the same for Ruby and that worked.
I could not get any RPM, Zypper, RVM installers to install properly. In each case they all seemed to have issues with zlib ?
OTHER TIPS
zypper in ruby-devel
It works for me. And if you also miss gcc, then
zypper in gcc
You are possibly missing gcc. Try installing it with zypper (or yum), and then try installing your gems:
zypper in gcc
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow