【问题标题】:Error installing RedCloth on Debian x64 Squeeze在 Debian x64 Squeeze 上安装 RedCloth 时出错
【发布时间】:2013-12-12 11:05:01
【问题描述】:
gem install RedCloth
Building native extension. This could take a while...
ERROR:  Error installing RedCloth:
        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 extconf.rb:1:in `<main>'

Gem files will remain installed in /var/lib/gems/1.8.1/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/RedCloth-4.2.9/ext/redcoth_scan/gem_make.out

我安装的 Ruby 版本是 1.9.3p194

为什么我在尝试安装RedCloth 时收到此错误?

【问题讨论】:

    标签: ruby rubygems debian redcloth


    【解决方案1】:

    为了解决这个问题,我必须更新到最新版本的 Ruby,或者至少更新到1.9.3

    我从 root 运行以下命令集,它适用于我:

    apt-get -y remove ruby
    apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion locales-all python libxml2
    curl -L https://get.rvm.io | bash -s stable --rails
    source /usr/local/rvm/scripts/rvm
    

    这将完全安装最新版本的 Ruby,然后您可以运行:

    gem install RedCloth -v '4.2.9'
    

    现在将安装 RedCloth。 RVM 将管理您的 Ruby 安装。 Ruby 现在也可以工作了。

    【讨论】:

      猜你喜欢
      • 2012-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多