Ruby selenium-webdriver를 설치하려고 하는데 다음 오류가 발생합니다.
sudo gem install selenium-webdriver
[sudo] password for sam:
Building native extensions. This could take a while...
ERROR: Error installing selenium-webdriver:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.4.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby2.4 -r ./siteconf20170509-10458-cbn64m.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.4.0/gems/ffi-1.9.18 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.18/gem_make.out
여러 포럼에서 찾은 여러 가지 방법을 시도했지만 저에게는 효과가 없었습니다. Ruby 버전은 2.4, Ubuntu 버전은 16.04
답변1
나는 이것을 시도했고 내 문제를 해결했습니다.
sudo apt-get install ruby2.4-dev