加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

在Fedora18安装下一代静态网站生成框架Awestruct

发布时间:2013-11-03 11:52:55 所属栏目:Linux 来源:站长网
导读:Awestruct是非常棒的静态网站生成框架,他基于Jekyll,使用Ruby语言开发。Awestruct可以根据模板生 成非常漂亮的网站,例如可以用BootStrap或者BluePrint,这两
Awestruct是非常棒的静态网站生成框架,他基于Jekyll,使用Ruby语言开发。Awestruct可以根据模板生 成非常漂亮的网站,例如可以用BootStrap或者BluePrint,这两个大名鼎鼎的东东不用多说了吧,地球人都知 道。废话不多说,进入主题。安装Ruby环境

首先安装一些依赖库,否则安装Awestruct会报如下的错误 :

Building native extensions.  This could take a while... 
......... 
ERROR:  Error installing 下一代静态网站生成工具:         
        ERROR: Failed to build gem native extension. .         
        /usr/bin/ruby extconf.rb 
checking for stdio.h... *** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers.  Check the mkmf.log file for more 
details.  You may need configuration options. 
. 
Provided configuration options:         
        --with-opt-dir         
        --without-opt-dir         
        --with-opt-include         
        --without-opt-include=${opt-dir}/include         
        --with-opt-lib         
        --without-opt-lib=${opt-dir}/lib         
        --with-make-prog         
        --without-make-prog         
        --srcdir=.         
        --curdir         
        --ruby=/usr/bin/ruby 
/usr/share/ruby/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. 

(RuntimeError) 
You have to install development tools first.         
        from /usr/share/ruby/mkmf.rb:506:in `try_cpp'         
        from /usr/share/ruby/mkmf.rb:931:in `block in have_header'         
        from /usr/share/ruby/mkmf.rb:790:in `block in checking_for'         
        from /usr/share/ruby/mkmf.rb:284:in `block (2 levels) in postpone'         
        from /usr/share/ruby/mkmf.rb:254:in `open'         
        from /usr/share/ruby/mkmf.rb:284:in `block in postpone'         
        from /usr/share/ruby/mkmf.rb:254:in `open'         
        from /usr/share/ruby/mkmf.rb:280:in `postpone'         
        from /usr/share/ruby/mkmf.rb:789:in `checking_for'         
        from /usr/share/ruby/mkmf.rb:930:in `have_header'         
        from extconf.rb:2:in `<main>'

开始安装依赖库,用 root 用户或者 su 执行如下 命令:

yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel

我是 Fedora的粉丝,对不住用其它发行版的童鞋了,请自行根据我列出的安装包找到对应的系统安装方法。

安装Ruby和RubyGems,用 root 用户或者 su 执行如下命令:

yum install ruby ruby-devel ruby-irb rubygems

Fedora18 Yum源的Ruby非常新,都是目前(2012-12-14)的最新版本,看看安装的 Ruby版本:

正在安装    : libyaml-0.1.4-3.fc18.x86_64                                     

      1/10
正在安装    : ruby-libs-1.9.3.327-22.fc18.x86_64                                    2/10
正在安装    : ruby-irb-1.9.3.327-22.fc18.noarch                                     3/10
正在安装    : rubygem-json-1.6.5-2.fc18.x86_64                                      4/10
正在安装    : rubygem-io-console-0.3-22.fc18.x86_64                                 5/10
正在安装    : rubygem-bigdecimal-1.1.0-22.fc18.x86_64                               6/10
正在安装    : rubygem-rdoc-3.12-5.fc18.noarch                                       7/10
正在安装    : rubygems-1.8.24-3.fc18.noarch                                         8/10
正在安装    : ruby-1.9.3.327-22.fc18.x86_64                                         9/10
正在安装    : ruby-devel-1.9.3.327-22.fc18.x86_64

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读