Unable to resolve Ruby error (missing psych)

前端 未结 8 1355
死守一世寂寞
死守一世寂寞 2020-12-16 16:38

Whenever I run something with Ruby on my server, I get the following error:

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `

        
相关标签:
8条回答
  • 2020-12-16 17:28

    Make sure your Redhat machine has a valid subscription:

    # subscription-manager list 
    
    +-------------------------------------------+
        Installed Product Status
    +-------------------------------------------+
    Product Name:   Red Hat Enterprise Linux Server
    Product ID:     69
    Version:        7.1
    Arch:           x86_64
    Status:         Subscribed
    Status Details: 
    Starts:         06/13/2014
    Ends:           06/12/2015
    

    Status must say "Subscribed". If not, then suffer through getting a login and maybe purchasing a subscription at https://access.redhat.com/management/consumers.

    When that's done, run

    # subscription-manager repos --enable rhel-7-server-optional-rpms
    

    then libyaml-devel will install OK.

    0 讨论(0)
  • 2020-12-16 17:29

    On a RHEL based distro such as CentOS 6.x you need to add another yum repository such as EPEL which contain the libyaml-devel package.

    Keys for EPEL or download
    RPM for EPEL

    More info:

    • CentOS - Additional Resources
    • Fedora Project: EPEL Howto

    Would also suggest the use of yum-plugin-priorities

    Add EPEL Yum Repository

    rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
    rpm -Kih http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    

    Install libyaml-devel via yum

    yum -y install libyaml-devel
    

    Packages

    Dependencies Resolved
    
    ====================================================================================
     Package                       Arch         Version           Repository       Size
    ====================================================================================
    Installing:
     libyaml-devel                 x86_64       0.1.3-1.el6       epel             84 k
    Installing for dependencies:
     libyaml                       x86_64       0.1.3-1.el6       epel             52 k
    
    Transaction Summary
    ====================================================================================
    Install       2 Package(s)
    
    0 讨论(0)
提交回复
热议问题