为什么我无法在 Ubuntu 12.10 中安装 libnotify?

为什么我无法在 Ubuntu 12.10 中安装 libnotify?

我的环境:

play@ubuntu:~$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/play/.rvm/gems/ruby-1.9.3-p327-dev
  - RUBY EXECUTABLE: /home/play/.rvm/rubies/ruby-1.9.3-p327-dev/bin/ruby
  - EXECUTABLE DIRECTORY: /home/play/.rvm/gems/ruby-1.9.3-p327-dev/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/play/.rvm/gems/ruby-1.9.3-p327-dev
     - /home/play/.rvm/gems/ruby-1.9.3-p327-dev@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

尝试安装 libnotify 时:

play@ubuntu:~$ sudo gem install ruby-libnotify
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-libnotify:
    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 /usr/lib/ruby/vendor_ruby/mkmf-gnome2.rb:13:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:11:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/ruby-libnotify-0.5.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ruby-libnotify-0.5.1/ext/gem_make.out

答案1

请参阅 Github 上的此主题,在编辑标题下方。它似乎有您正在寻找的答案。

相关内容