The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

install YAML, please help?

Discussion in 'General Discussion' started by ozzieonline, Jan 12, 2013.

  1. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    I want to be able to use the yaml_parse function in PHP.

    Can anyone please help me to install the extension?

    I tries this in Putty:

    pecl install yaml

    Then I got a message saying I need to install libyaml first. However I can't find the correct way to do that. I found this link InstallingWithPecl - php-yaml - Instructions for installing extension with pecl - LibYAML extension for php - Google Project Hosting and it says you install it by using "apt-get install libyaml-dev", but this is for a Ubuntu machine. Mine is Centos.

    Can anyone please help me?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Did you try in:
    WHM-> Software-> Module Installers-> PHP Pecl-> manage
     
  3. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Thanks for the tip! I just tried it by installing 'yaml' but it says:

    "configure: error: Please install libyaml"
    I think I have to install libyaml first, but I don't know how.

    These are the last lines of the installation attempt (I highlighted the comment about libyaml):

    checking whether to enable LibYAML suppot... yes, shared
    checking for yaml headers... not found
    configure: error: Please install libyaml
    ERROR: `/root/tmp/pear/yaml/configure --with-yaml' failed
    The yaml.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20100525
    Tidying /usr/local/lib/php.ini...
    No changes
    Tidying /usr/local/cpanel/3rdparty/etc/php.ini...
    No changes
     
  4. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Well, I found some instructions how to install libyaml, but I still need a little help. The instructions say I have to download a source package, but it does not mention where I should place it (in which directory) on the server. I created a directory in my main cPanel account directory, but when I executed the commands I got an error saying the path was incorrect and that it could not find a C compiler. Does anybody know where I should place the downloaded file?

    Here are the short install instructions: LibYAML

    Really hope someone out there can help me.

    OOPS... I realise now that I have disabled compiler access in the security settings. Could that be the reason why it's not working? Can I enable it temporarily to install libyaml and then disable it again? Or will it always have to be enabled for libyaml to work?
     
    #4 ozzieonline, Jan 12, 2013
    Last edited: Jan 12, 2013
  5. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    You compile it as root.
     
  6. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    You mean as root user? Yes I understand... but where do I place the source package. In which directory??? And does the compiler acces in WHM have to be enabled or is that not necessary?
     
  7. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    as the root user do this:
    Code:
    cd /root
    mkdir LibYAML
    cd LibYAML
    wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
    tar -xvzf yaml-0.1.4.tar.gz
    cd yaml-0.1.4
    ./configure
    make
    make install
    
    when you are done you can remove the directory /root/LibYAML

    the root user has always compiler access
     
  8. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    quietFinn... it works!!!!! :D :rolleyes: :D

    Thank you so very much!! Couldn't have pull it off without your help! Thanks!!!!
     
Loading...

Share This Page