Failed to build gem native extension when install RedCloth-4.2.9 install Linux

前端 未结 8 2099
清酒与你
清酒与你 2020-12-23 15:14

I want to install Octopress in my computer. I try to do it like

Octopress document.

When I run

bundle install

相关标签:
8条回答
  • 2020-12-23 15:28

    I was installing Octopress too and got the same problem as yours. After checking the mkmf.log file I figured out that gcc-4.2 had not been found. I Even installed xcode with the command line tools. It worked when I made a symlink like this:

    $ sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
    $ bundle install
    
    0 讨论(0)
  • 2020-12-23 15:36

    Make sure you also have the build-essential package installed. You can check using

    dpkg -l | grep build-essential

    or simply install it without checking

    sudo apt-get install build-essential

    For me on Ubuntu 14.04.1 LTS, after making sure build-essential is installed, the bundle install command works/builds fine also with Ruby 1.9.3.

    0 讨论(0)
  • 2020-12-23 15:38

    You've probably upgraded to Mountain Lion and have not rebuilt your ruby-1.9.2 install yet with the new development packages.

    rvm --force install 1.9.2
    gem install bundle --no-ri --no-rdoc
    bundle install
    

    If you don't have the Mountain Lion dev packages installed correctly, use the ThoughtBot instructions.

    0 讨论(0)
  • 2020-12-23 15:40

    I fixed this issue by running

    sudo apt-get install ruby-dev
    

    as described in this blog post.

    0 讨论(0)
  • 2020-12-23 15:42

    For Ubuntu 14.04 simply do this:

    sudo apt-get install ruby1.9.3
    

    Should work for 13.10 and 13.04 too. (Not tested)

    0 讨论(0)
  • 2020-12-23 15:43

    My ubuntu 12.04 solution is install the ruby1.9.1-full version, that can resolve this issue.

    sudo apt-get install ruby1.9.1-full
    

    you can execute command:

    sudo update-alternatives --config ruby
    

    to select the altiernative ruby which you have installed. and then, execute below commands to finish the octopress deploy:

    git clone https://github.com/erizhang/octopress.git octopress
    cd octopress/
    sudo gem install bundler
    sudo gem install RedCloth -v '4.2.9'
    bundle install
    rake install
    

    below commands you can find from octopress deploy guideline page:

    rake setup_github_pages
    sudo rake setup_github_pages
    sudo rake generate
    sudo rake deploy
    

    Hope it's helpful for you, thanks

    0 讨论(0)
提交回复
热议问题