我的系统是centos6.5 lolcat彩虹特效依赖的是ruby2.1.5以上的版本。
所以我们第一步,编译安装ruby2.1.5
安装依赖环境:
[[email protected] ~]# yum groupinstall "Development tools" 或者: [[email protected] ~]# yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel
清除所以ruby以安装的项目,以免影响
[[email protected] ~]# yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs
下载ruby源码包:
[[email protected] ~]# wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz
编译安装:
[[email protected] ~]# tar zxf ruby-2.1.5.tar.gz [[email protected] ~]# cd ruby-2.1.5 [[email protected] ~]# ./configure [[email protected] ~]# make && make install [[email protected] ~]# ruby -v ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
ruby依赖环境配置好了之后,下载lolcat彩虹特效源码:
[[email protected] ~]# wget https://github.com/busyloop/lolcat/archive/master.zip [[email protected] ~]# unzip master.zip [[email protected] ~]# cd lolcat-master/bin [[email protected] ~]# gem install lolcat
等待安置完成
[[email protected] ~]# lolcat -v lolcat 42.1.44 (c)2011 [email protected]
时间: 2024-10-12 03:43:17