今天看到一个sass的玩意,非常好奇,于是想玩玩,杯具就开始……
这个东东是用ruby搞出来的,于是你需要有个ruby,开始想用ubuntu的apt装完,没想到,装了几个都没有把sass给装出来。
于是,一气之下,再冷静地决定从源码编译!!!ruby,然后再装sass……
于是就有了下面的记录……
- 安装依赖
- sudo apt-fast build-dep ruby1.8 ruby1.9
- 下载源码:
- wget “ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz“
- wget “ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz“
- wget “http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz“
- tar -xvf “…”
- 编译
- RUBY_HOME=/opt/ruby
- cd ruby-1.8.7
- autoconf
- ./configure –prefix=$RUBY_HOME/1.8 –program-suffix=1.8
- make
- 报如下错误:
- math.c:37: error: missing binary operator before token “(“
- vim math.c
- 找到:#elif define(ERANGE)
- 改为:#elif defied(ERANGE)
- make
- make install
- export PATH=$PATH:$RUBY_HOME/1.8/bin
- type “ruby1.8 –vesion”, you will see :
- ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
- cd rubygems-1.8.10
- ruby1.8 setup.rb
- 编译1.9.0
- cd ruby-1.9.0
- ./configure –with-baseruby=$RUBY_HOME/1.8/bin/ruby1.8 –prefix=$RUBY_HOME/1.9 –program-suffix=1.9
- 就是这里啦,就是这里,居然编译个1.9还需要1.8,神马呀!!!太麻烦啦
- make
- 报错:
- openssl_missing.h:119: error: conflicting types for ‘BN_rand_range’
- sudo mv -v /usr/include/openssl{,.bak}
- make clean
- make
- make install
- sudo mv -v /usr/include/openssl{.bak,}
- export PATH=$PATH:$RUBY_HOME/1.9/bin
- ruby1.9 –version
- ruby 1.9.0 (2007-12-25 revision 14709) [x86_64-linux]
- 安装sass
- 原来的源没法下载,尝试下面的源
- gem1.8 sources -a http://gems.github.com –verbose
- gem1.8 install sass –verbose
- 源没用……
- 直接下gem包就好了
- wget http://rubyforge.org/frs/download.php/75351/haml-3.1.3.gem
- wget http://rubyforge.org/frs/download.php/75409/sass-3.1.10.gem
- gem18 install *.gem
- 参考:
- http://os.51cto.com/art/201004/192729.htm
- http://crunchlife.com/articles/2008/09/14/installing-ruby-1-8-and-1-9-on-ubuntu-from-source
- http://autotest.blog.163.com/blog/static/17498235420111243492535/
- http://www.hksilicon.com/kb/cn/articles/30890/Linux-SASS
- http://stackoverflow.com/questions/5193935/error-when-compiling-ruby-1-8-7-from-source-math-c37-error-missing-binary-op
- http://bbs.chinaunix.net/viewthread.php?tid=2296779&rpid=15583640&ordertype=0&page=1#pid15583640
- http://rubyforge.org/
发表评论
要发表评论,您必须先登录。