Ubuntu: How to edit INC with latest library in perl



Question:

How can I avoid the error below when running a Perl script?

Can't locate YAML/XS.pm in @INC (@INC contains: ../../../YAML-LibYAML-0.35/blib/lib/YAML/XS.pm /app/utp/utp/apps_oper/perl5lib ../../../3rdparty/YAML-LibYAML-0.35/blib/lib ../../../3rdparty/YAML-LibYAML-0.35/blib/arch ../../../perl ../../adhoc/perl ../../api/perl ../../3rdparty/YAML-LibYAML-0.35/blib/lib ../../3rdparty/YAML-LibYAML-0.35/blib/arch ./common ../../adhoc/perl ../../api/perl ../../../3rdparty/YAML-LibYAML-0.35/blib/lib ../../../3rdparty/YAML-LibYAML-0.35/blib/arch ./common ../../adhoc/perl ../../api/perl /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at common/FixMessageData.pm line 32.  BEGIN failed--compilation aborted at common/FixMessageData.pm line 32.  Compilation failed in require at common/OrderGenSessionFact.pm line 32.  BEGIN failed--compilation aborted at common/OrderGenSessionFact.pm line 32.  Compilation failed in require at OrderGenSessionClient.pl line 21.  BEGIN failed--compilation aborted at OrderGenSessionClient.pl line 21.  


Solution:1

The missing YAML/XS.pm is part of the package libyaml-libyaml-perl.

Therefore install via:

 sudo apt-get install libyaml-libyaml-perl  

Why do I know that?

% apt-file search YAML/XS.pm  libyaml-libyaml-perl: /usr/lib/x86_64-linux-gnu/perl5/5.20/YAML/XS.pm  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »