Photon OS

 View Only
  • 1.  install perl module failed ; environnment : photon os 3 and perl 5.28.0 and VCSA 8

    Posted Oct 19, 2023 02:45 PM

    Hi everybody !

     

    We want to custum VMs depoyement using perl script file:

    i follow this documentation: https://kb.vmware.com/s/article/2007557 ( and so on)

    have to install XLM::MOD::Path and all the dependency.

    i can't go any further, i an stuck to the XML:Parse module installation.

    Someone have already try to deploy VMs from perl script and have passed this issu ?

     

    here is the message error :

    Running make test :

    ....................

    ...................................

    # Failed test at t/decl.t line 86.
    # got: '((bar|foo|xyz+),bar)'
    # expected: '((bar|foo|xyz+),zebra*)'

    # Failed test at t/decl.t line 95.
    # got: 'bar'
    # expected: 'zebra'

    # Failed test at t/decl.t line 96.
    # got: undef
    # expected: '*'
    # Looks like you failed 3 tests of 40.

    ..........................

    ....................................

    make: *** [Makefile:971: test_dynamic] Error 255
    TODDR/XML-Parser-2.46.tar.gz
    make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
    reports TODDR/XML-Parser-2.46.tar.gz


    Thanks in advance

     

    best regards



  • 2.  RE: install perl module failed ; environnment : photon os 3 and perl 5.28.0 and VCSA 8

    Posted Oct 25, 2023 08:45 PM

    Hi,

    Sorry for the long delay here on the Photon OS community forum.

    For VCSA, the best way is to get paid support from your subscription. Maybe a few prerequisites are explicitly not installed by default because the method to gather the information needed is deprecated.

     

    With respect to the issue 'XML-Parser-2.46.tar.gz' on open-source Photon OS, have you installed the package build-essential ?

    I'm not a perl programmer, but I've tried to reproduce the issue on Photon OS 3 - here the bash script and a few findings.

    # sample script on photon-3.0-935534
     
    # update repo url if necessary
    if [ `cat /etc/yum.repos.d/photon.repo | grep -o "packages.vmware.com/photon" | wc -l` -eq 0 ]; then
    cd /etc/yum.repos.d/
    sed -i 's/dl.bintray.com\/vmware/packages.vmware.com\/photon\/$releasever/g' photon.repo photon-updates.repo photon-extras.repo photon-debuginfo.repo
    fi
     
    # install perl
    tdnf install -y perl expat build-essential
     
    # to do : store locally sample-generate-name-ip.pl from https://kb.vmware.com/s/article/2007557
     
    # to do : the path for lib.pm is /root/.cpan/build/local-lib-2.000029-2/lib/local/lib.pm
     
    # run
    perl -MCPAN -e 'install XML::DOM::XPath'

     

    Perl is installable with tdnf install perl. Yes, the latest version 5.28 on Photon OS does not find lib.pm and it seems that after version 5.15 it has to be specified explicitly.

     
    Unfortunately, after a few retries, perl -MCPAN -e 'install XML::DOM::XPath' still fails with
    [...]
    Result: FAIL
    Failed 33/35 test programs. 1/3 subtests failed.
    make: *** [Makefile:842: test_dynamic] Error 2
    MIROD/XML-DOM-XPath-0.14.tar.gz
    one dependency not OK (XML::DOM); additionally test harness failed
    make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
    reports MIROD/XML-DOM-XPath-0.14.tar.gz
     
    It should be possible to declare the missing modules for Photon OS 3 as well.
    These sub-forums might help as well.
     
    Hope it helps.


  • 3.  RE: install perl module failed ; environnment : photon os 3 and perl 5.28.0 and VCSA 8

    Posted Oct 26, 2023 07:54 AM

    Hi Dcasota,

     

    thank you very much for your reply and  all those informations.

    yes i have installed the build-essential, but no success result

    i have success to install all dependency module of the fisrt one i.e. XML::DOM::XPath exept XML::Parser

    i finalement force it to be installed ans so the XML::DOM::XPath have also been installed.

    but the customization script to deploy VMs do not execute itself, with the message error: An error occurred during customization while running the IP or host name generator application

     

    thanks for links to open the issu

     

    best regards



  • 4.  RE: install perl module failed ; environnment : photon os 3 and perl 5.28.0 and VCSA 8

    Posted Oct 26, 2023 08:30 AM

    It's a honor. Good luck with your cloud automation builder system.