Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Can't locate module in @INC when executing script over SSH

by haukex (Archbishop)
on Jan 27, 2023 at 20:26 UTC ( [id://11149955]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Can't locate module in @INC when executing script over SSH
in thread Can't locate module in @INC when executing script over SSH

Even though I have local::lib installed on the remote machine, I now get this error: Can't locate local/lib.pm in @INC

Do you know where you installed it? If you have root access to the remote machine, you could install local::lib to the system Perl (e.g. on Debian-based systems: sudo apt-get install liblocal-lib-perl), or you could ask the admin to do so.

So any other suggestions would still be appreciated.

Sure, there are lots of other ways. For example, you could build your own Perl in your home directory using perlbrew, that'll then be a self-contained install with all modules in its installation directory, so that when you run your script on that perl, there'll be no confusion about where the modules are because they'll all be in the @INC compiled into Perl. I list a few more ways of how to set @INC in this node, but which one is best in your case depends on several factors, like whether you have root on the remote machine, whether you can build your own Perl, whether this script is going to need to be portable across many machines, or just one or two, and so on - if you provide more details on your situation we can probably make better recommendations.

Edited to add

AFAICT that's not the only edit you made, at first your node didn't contain the error message regarding local::lib. Please mark all significant edits, see How do I change/delete my post?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-28 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found