I'm trying to run a perl script designed to update the database on a remote server from the copy on our main server. Both dbs are in postgresql and running the slony replication setup. Semi-recently, the server went down on the remote unit and had to be replaced; I was able to get the db running again, and slony, but now I've got a new problem from the perl script.

Whenever I run the actual script, I end up getting error messages. The first few simply said they couldn't find some file; usually, the file names were only a few characters long, and ended in .pm. Those I was able to 'solve' by going out and finding a copy of the file in another remote system, then copying it into the one I was working on. (This might have been a bad idea; I don't know whether I should have done that or not.) Eventually, though, I got to an error message that read as follows:

" Can't locate loadable object for module IO::Tty in @INC []at /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/IO/Tty.pm line29
Compliation failed in require at /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/IO/Pty.pm line 7.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/IO/Pty.pm line 7.
Compliation failed in require at /usr/lib/perl5/site_perl/5.8.6/Expect.pm line 22.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.6/Expect.pm line 22.
Compliation failed in require at /usr/lib/perl5/site_perl/5.8.6/Net/SCP/Expect.pm line 10.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.6/Net/SCP/Expect.pm line 10.
Compilation failed in require at /etc/cron.hourly/<file> line 32.
Begin failed--compilation aborted at /etc/cron.hourly/<file> line 32."

The [] is the list of the items included in the @INC; I'll post those if needed. The <file> is our file; it's the property of my employers, so I'm not sure that I should name it here. However, the line it's blowing up on is "use Net::SCP::Expect;".

Does anyone here have any clue whatsoever what my problem might be, and if so, does anyone have any possible solutions as to how to solve it? It's taken so long to get everything updated that, as I write this out, the server with the problem is nearing the 100-missed-update mark, and it'd be nice to figure out what's going wrong before that happens. Even if all you can do is point me in the right direction, that would be greatly appreciated.

Thanks in advance,

The shared library that IO::Tty uses can't be found. If you have a compiler on the computer, your best bet would be to download the IO::Tty module from CPAN and reinstall it (and any others that the module complains that it needs when you try to compile it).

If that is not possible search on that other machine for a (I believe it is called) Tty.so file. You are probably better off however (if the two systems are of the same OS and Architecture) is to copy the entire perl directory from the machine that works to this one that is complaining.

You currently have a completely mangled Perl installation. Your best recourse would be to reinstall it with all modules that it had before, failing the ability and/or time to do this and you must copy from one to another, then copy the entire perl distribution. It will save you alot of time and frustation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.