Software Development Kit (SDK) and API Discussions

Trying to get SDK working on Red Hat (first time)

bbjholcomb

Error message:

Can't locate NaServer.pm in @INC

Code:

use lib "/root/netapp/sdk50/perl/NetApp;/root/netapp/sdk50/perl/NetApp/XML";

use NaServer (this is where is dies)

I opened a case with NetApp but support isn't there.

7 REPLIES 7

sens

Hi,

Did you check if NaServer.pm is present under one of the folders you have mentioned for 'use lib', i.e.:

/root/netapp/sdk50/perl/NetApp

/root/netapp/sdk50/perl/NetApp/XML

Usually the perl libraries for NMSDK are located under:

<path to nmsdk root>/lib/perl/NetApp

Regards,

Sen.

bbjholcomb

Yes the file is there:

/root/netapp/sdk50/perl/NetApp/NaServer.pm

sens

You are seeing an error because of the wrong usage of Perl "use lib" (and nothing specific to NMSDK).

If you are providing multiple paths in "use lib", you can either specify them as a list (e.g. using "qw") or as separate "use lib" statements.

e.g.

use lib qw(/root/netapp/sdk50/perl/NetApp /root/netapp/sdk50/perl/NetApp/XML);

or

use lib "/root/netapp/sdk50/perl/NetApp";

use lib "/root/netapp/sdk50/perl/NetApp/XML";

Please let me know if this helps.

Regards,

Sen.

bbjholcomb

Didn't change anything:

Not I have:

use lib qw(/root/netapp/sdk50/perl/NetApp /root/netapp/sdk50/perl/NetApp/XML);

use NaServer;

I get:

Can't locate loadable object for module XML::Parser::Expat in @INC (@INC contains: /root/netapp/sdk50/perl/NetApp /root/netapp/sdk50/perl/NetApp/XML /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 /root/netapp/sdk50/perl/NetApp/XML/Parser.pm line 15

sens

Hi,

From the error message it seems to me that XML:Parser.pm and/or Parser:Expat.pm were not installed properly (or at least not installed under a default location, somewhere under '@INC').

I am guessing you have the following files/directories under /root/netapp/sdk50/perl/NetApp/XML

Parser.pm                    # file

Parser                          # directory

And under Parser directory, you would have the Expat.pm.

Parser directory would also have other dependencies (e.g.  Encodings) required for Expat.pm.

If this is the case, you would need to add /root/netapp/sdk50/perl/NetApp/XML/Parser and subsequent dependent directories to the lib path (using "use lib").

However, it is recommended to install the module under usual @INC paths so that "use lib" does not get too big.

Moreover, just ensure that XML:Parser module is "installed" (using make) and not just "copied" under /root/netapp/sdk50/perl/NetApp/XML.

Regards,

Sen.

bbjholcomb

I'm a novice user of Linux. I solved the problem.

Anybody else that has this problem verify Parser is installed:

rpm -qa | grep -i parser | grep -i xml

To get it working:

yum install perl-XML-Parser

sens

Hi,

Glad to know that your problem is resolved after installing XML::Parser.

In case you face any other issues while using NMSDK, please feel free to post your queries on the communities.

Regards,

Sen.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public