I have a script that I inherited from another developer and am trying to make it work on a new RHEL server. The script uses Expect.pm which 'uses' IO/Pty (and IO/Tty).

The issue is, when I run this script, it claims it cannot locate IO/Pty.pm. The path to both IO modules is /usr/local/lib64/perl5/IO. This path is in my @INC.

I have verified the permissions match what other functioning modules have (also tried 775 as a test).

The only difference on the new server vs old is the version of Expect.pm and IO/Pty and IO/Tty (newer versions on the new server).

Any idea how I can get this to work?

Here is the error:

[Tue Dec 17 14:33:51.284748 2019] [cgi:error] [pid 64712] [client redacted:63776] AH01215: Can't locate IO/Pty.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/share/perl5/Expect.pm line 23

drwxr-xr-x. 17 root root 4096 May  8  2019 /usr
drwxr-xr-x. 18 root root 4096 May 20  2019 /usr/local
drwxr-xr-x.  3 root root 4096 Jul 12 13:44 /usr/local/lib64
drwxr-x---   4 root root 4096 Dec 17 12:18 /usr/local/lib64/perl5
drwxr-x---   4 root root 4096 Dec 17 12:18 /usr/local/lib64/perl5/
drwxrwxr-x   3 root root 4096 Dec 17 14:56 /usr/local/lib64/perl5/IO
-rwxrwxr-x   1 root root 9114 Sep 12  2014 /usr/local/lib64/perl5/IO/Pty.pm
-rwxrwxr-x   1 root root 8096 Sep 12  2014 /usr/local/lib64/perl5/IO/Tty.pm
  • ls -ld /usr /usr/local /usr/local/lib64 /usr/local/lib64/perl5 /usr/local/lib64/perl5/IO /usr/local/lib64/perl5/IO/???.pm please. – roaima Dec 17 '19 at 21:07
  • Updated w/ output (currently on higher permissions than normal since I was trying to figure out if that was the issue) – Jason M Dec 17 '19 at 21:15

Your application almost certainly doesn't have access to one of the intermediate directories:

drwxr-x---   4 root root 4096 Dec 17 12:18 /usr/local/lib64/perl5

You can fix this (as root) with chmod o+rx /usr/local/lib64/perl5

| improve this answer | |
  • Doing that helped, I ended up doing a chmod -R to just catch everything in each of the @INC folders and after installing some more modules that (and fixing their permissions) I managed to get the script to work. – Jason M Dec 17 '19 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.