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]; ...
In reply to Re: Weird perl issue, installed packages not being recognized
by parv
in thread Weird perl issue, installed packages not being recognized
by kvn95ss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |