简体   繁体   English

红宝石宝石罗盘安装错误

[英]ruby gem compass installation error

I am trying to install gem compass , but I am getting the following error while running sudo gem install compass 我正在尝试安装gem compass ,但是在运行sudo gem install compass时出现以下错误

Fetching: sass-3.4.22.gem (100%)
Fetching: multi_json-1.12.1.gem (100%)
Fetching: compass-core-1.0.3.gem (100%)
Fetching: compass-import-once-1.0.5.gem (100%)
Fetching: chunky_png-1.3.8.gem (100%)
Fetching: rb-fsevent-0.9.8.gem (100%)
Fetching: ffi-1.9.14.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing compass:
ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:4:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.14 for inspection.

Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.14/ext/ffi_c/gem_make.out 结果记录到/var/lib/gems/1.9.1/gems/ffi-1.9.14/ext/ffi_c/gem_make.out

My gem version is 1.8.23 我的宝石版本是1.8.23

please try this first. 请先尝试一下。

xcode-select --install
sudo gem update --system
sudo gem install compass

If this not working then 如果这不起作用,那么

sudo apt-get remove ruby
apt-get autoremove
sudo apt-get install ruby2.2(Change from your ruby version)
sudo gem install compass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM