Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Weird perl issue, installed packages not being recognized

by parv (Parson)
on Apr 08, 2021 at 07:30 UTC ( [id://11131000]=note: print w/replies, xml ) Need Help??


in reply to Weird perl issue, installed packages not being recognized

You need to find where the modules were installed so that you can supply those paths to lib pragma: use lib '/path/to/module';. Or, install the software on your own in known locations.

One way to find the file paths of system installed software ...

# Locate LWP::UserAgent. % rpm -qa | fgrep -i useragent # Take the name from above to find the installed paths. % rpm -ql <package name> | fgrep LWP/UserAgent

Then use the paths from above command output to supply to lib pragma.

Below is an example for "DBD::SQLite" module installed here on CentOS 8 ...

% rpm -qa | egrep -i '(perl|p5).+SQLite' perl-DBD-SQLite-1.58-2.module_el8.1.0+207+bdacd7b7.x86_64 % rpm -ql perl-DBD-SQLite-1.58-2.module_el8.1.0+207+bdacd7b7.x86_64 | +fgrep 'DBD/SQLite' /usr/lib64/perl5/vendor_perl/DBD/SQLite /usr/lib64/perl5/vendor_perl/DBD/SQLite.pm /usr/lib64/perl5/vendor_perl/DBD/SQLite/Constants.pm /usr/lib64/perl5/vendor_perl/DBD/SQLite/Cookbook.pod /usr/lib64/perl5/vendor_perl/DBD/SQLite/Fulltext_search.pod /usr/lib64/perl5/vendor_perl/DBD/SQLite/VirtualTable /usr/lib64/perl5/vendor_perl/DBD/SQLite/VirtualTable.pm /usr/lib64/perl5/vendor_perl/DBD/SQLite/VirtualTable/FileContent.pm /usr/lib64/perl5/vendor_perl/DBD/SQLite/VirtualTable/PerlData.pm /usr/lib64/perl5/vendor_perl/auto/DBD/SQLite /usr/lib64/perl5/vendor_perl/auto/DBD/SQLite/SQLite.so # In Perl program, if "/usr/lib64/perl5/vendor_perl" had not been # already included in @INC which it is per "perl -V" (near the bottom) +. ... use lib q[/usr/lib64/perl5/vendor_perl]; ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found