I'm trying to run a perl script on FreeBSD. This script tries to access libutil.so.5, while I have libutil.so.7 linked from libutil.so in
/usr/lib/ . The error shown is as follows:
DynaLoader line 230 is as follows:
I have tried the following things, which didn't prove to be useful:
1. Created a new libutil.so.5 in /usr/lib/ and linked it to libutil.so.5 -> /lib/libutil.so, where already libutil.so -> /lib/libutil.so.7 is
there. This didn't work.
2. Reinstalled perl modules several times and that too didn't work.
3. Installed the latest perl version perl5.10.0 and ran the perl script with this version, problem was still there.
Can you please advise what should I do to alleviate this problem? I don't know how to install the libutils port. So, couldn't try that out.
Since this file is asked by the Tty.so, which can't be edited using text editor, is there any other way so that it asks for libutil.so.7
instead of 5?
The script that I was trying to run is the following: it basically tries to reboot the router connected to the serial port of the FreeBSD
machine.
/usr/lib/ . The error shown is as follows:
Code:
Can't load '/usr/local/lib/perl5/site_perl/5.8.8/mach/auto/IO/Tty/Tty.so' for module IO::Tty: Shared object "libutil.so.5" not found,
required by "Tty.so" at /usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm line 230
Code:
# Many dynamic extension loading problems will appear to come from
# this section of code: XYZ failed at line 123 of DynaLoader.pm.
# Often these errors are actually occurring in the initialisation
# C code of the extension XS file. Perl reports the error as being
# in this perl code simply because this was the last perl code
# it executed.
my $libref = dl_load_file($file, $module->dl_load_flags) or
croak("Can't load '$file' for module $module: ".dl_error());
1. Created a new libutil.so.5 in /usr/lib/ and linked it to libutil.so.5 -> /lib/libutil.so, where already libutil.so -> /lib/libutil.so.7 is
there. This didn't work.
2. Reinstalled perl modules several times and that too didn't work.
3. Installed the latest perl version perl5.10.0 and ran the perl script with this version, problem was still there.
Can you please advise what should I do to alleviate this problem? I don't know how to install the libutils port. So, couldn't try that out.
Since this file is asked by the Tty.so, which can't be edited using text editor, is there any other way so that it asks for libutil.so.7
instead of 5?
The script that I was trying to run is the following: it basically tries to reboot the router connected to the serial port of the FreeBSD
machine.
Code:
#!/usr/bin/perl
########################################################################
use V6evalRemote;
rOpen() || goto error; <--- MY GUESS IS THIS SCRIPT FAILS IN rOpen() FUNCTION ITSELF
rArg();
#rDebug(1);
$rOpt_timeout = 300 if ! defined($rOpt_timeout);
rLogin(5) || goto error;
rCommand("term len 0", $rOpt_timeout) || goto error;
rCommand("show version", $rOpt_timeout) || goto error;
rCommand("show startup-config", $rOpt_timeout) || goto error;
rCommand("show align", $rOpt_timeout) || goto error;
rCommand("configure terminal", $rOpt_timeout) || goto error;
rCommand("no ipv6 unicast", $rOpt_timeout) || goto error;
rCommand("ipv6 unicast", $rOpt_timeout) || goto error;
rCommand("end", $rOpt_timeout) || goto error;
rReboot($rOpt_timeout) || goto error;
rClose();
exit($V6evalRemote::exitPass);
error:
rClose();
exit($V6evalRemote::exitFail);
########################################################################