首页 > 系统相关 >Install Ruby 1.9.3 with libyaml on CentOS

Install Ruby 1.9.3 with libyaml on CentOS

时间:2023-04-20 12:34:36浏览次数:48  
标签:tar CentOS libyaml -- Ruby 1.9 install ruby


评:,其一就是安装ruby和rubygem,为了方便起见这里推荐安装ruby 1.9.2及之后的版本,这些版本已经包含了rubygem,无需单独安装,
Ruby 1.9.3-p0 makes psych—the replacement for 1.8.7’s YAML library, Syck—the default YAML parser. Psych is a wrapper around libyaml, so you’re going to need it installed and configured before installing Ruby.

If you install 1.9.3-p0 without libyaml, you’ll see warnings like this:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.

Installing libyaml

$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure --prefix=/usr/local
$ make
$ make install

Quick review of what’s going on: download and untar the source code, change to the directory and install the package. You may need to sudo the make install command. Your mileage may vary.
Installing Ruby 1.9.3-p0
复制代码

$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar xzvf ruby-1.9.3-p0.tar.gz
$ cd ruby-1.9.3-p0
$ ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
$ make
$ make install

复制代码

After installing, you can verify that Ruby was installed with ruby -v. It’s also worth trying gem --version to make sure you don’t get any errors regarding psych.

I tried installing libyaml-devel and libyaml from Yum, but couldn’t get ruby installed and recognizing those packages. Out of frustration, I turned to installing libyaml by source and it Just Worked™


CentOS 6下安装ruby 1.9

博客分类:
ruby


安装libyaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install

如果不安装libyaml,运行gem会出现:“It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby”警告。


安装ruby
tar -zxf ruby-1.9.3-p448.tar.gz
cd ruby-1.9.3-p448

./configure --enable-shared --disable-install-doc
make
make install

可以从下面两个地址下载ruby1.9:

http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/ http://mirrors.ibiblio.org/ruby/1.9/

参考文章:

Install Ruby 1.9.3 with libyaml on CentOS(转)

Install Ruby 1.9 in CentOS 6



--end

标签:tar,CentOS,libyaml,--,Ruby,1.9,install,ruby
From: https://blog.51cto.com/u_16080829/6209481

相关文章

  • CentOS 7下MariaDB 5.5升级到MariaDB 10.2
    转载自:https://cloud.tencent.com/developer/article/2075410==================== 一次CentOS7下升级MariaDB过程,在此记录下。原因:新的项目需要新的数据库版本支持。升级主要步骤:备份原数据库---》卸载mariadb---》添加mariadb国内yum源---》安装mariadb---》初始化......
  • centos9 redis安装报错(实在无解使用方法)
    报错如下[root@centosbin]#./redis-server./redis-server:errorwhileloadingsharedlibraries:libssl.so.1.1:cannotopensharedobjectfile:Nosuchfileordirectory使用的解决命令yummakecacheyum-yinstall*openssl*原过程root@centosbin]#lsredi......
  • Centos7 初始化
    1、禁用selinuxsetenforce0sed-i's/SELINUX=permissive/SELINUX=disabled/'/etc/sysconfig/selinuxsed-i"s/SELINUX=enforcing/SELINUX=disabled/g"/etc/selinux/config2、安装工具yuminstall-ywgetlrzsztreenet-toolsbash-completionpsm......
  • centos7.6升级内核后不生效
    查看已升级完成内核:[root@centos76-649~]#awk-F\''$1=="menuentry"{print$2}'/etc/grub2.cfgCentOSLinux(5.12.12-1.el7.elrepo.x86_64)7(Core)CentOSLinux(3.10.0-957.el7.x86_64)7(Core)CentOSLinux(0-rescue-4cb870464ad646829ae3......
  • centOS7下安装vim8.2
    请先安装nodejsyum安装设置Node.jsv16版本curl--silent--locationhttps://rpm.nodesource.com/setup_16.x|sudobash(setup_16里16是版本号,可根据自己需要修改)yum方式安装sudoyum-yinstallnodejs其它参考:以上命令安装不成功可执行:sudoyumcleanall若本地存......
  • centos7设置定时任务重启tomcat
    1、确认crontab是否安装crontab-l//返回nocrontabforroot,表示已安装2、生成重启tomcat文件vimtomcatStart.sh#!/bin/bash/etc/profileecho$JAVA_HOME#这里取jdk路径exportJAVA_HOME=/usr/java/jdk1.8.0_191#这里取tomcat路径tomcatPath="/data2/webapp/apache-tomcat-8......
  • CentOS7添加自定义脚本服务
    在CentOS7下,已经不再使用chkconfig命令管理系统开机自启动服务和条件自定义脚本服务了,而是使用管理unit的方式来控制开机自启动服务和添加自定义脚本服务。在/usr/lib/systemd/system目录下包含了各种unit文件,有service后缀的服务unit,有target后缀的开机级别unit等。如果想把自定......
  • 真实机u盘安装CentOS进入dracut模式解决办法
    真实机u盘安装CentOS进入dracut模式解决办法1.问题描述  昨天在真实机器(Dell笔记本)通过U盘安装 CentOS72003 操作系统时,无法正确引导,而是进入 dracut 模式,特此记录。2.解决方法  在dracut模式下,运行" ls-al/dev|grepsd "dracut#ls-al/dev|grepsd ......
  • 手拉手Centos7安装配置Redis7
    Redis(RemoteDictionaryServer),即远程字典服务,是一个开源的使用ANSIC语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。Redis是一个NoSQL数据库,常用缓存(cache)Redis数据类型:string(字符串)、list(链表)、set(集合)、zset(sortedset--......
  • VMware centos7静态IP,开通SSH
     1CMD里ipconfig查看虚拟机网卡分配的IP网段:  2虚拟机设置这里选自定义VMnet8,不然就算改了ifcfg-en32,也不能访问外网  3 vi/etc/sysconfig/network-scripts/ifcfg-en32BOOTPROTO=static    #开机协议,有dhcp及static;ONBOOT=yes     #设置为开......