Net::SSH::Perl and ld-elf.so.1

Recently I used the ports collection to install Net::SSH:Perl. I had a few issues since I tried installing from source originally (dumb mistake) then had issues with my system time being way off. Either way I believe I got everything to working correctly, but still get this error when calling the login routine:

Code:
#!/usr/bin/perl5

use Net::SSH::Perl;

$ssh = Net::SSH::Perl->new("*******.com");
$ssh->login("******", "********");
#my($stdout, $stderr, $exit) = $ssh->cmd("ls -al");
Code:
john@sporkit.com-> ./ssh_web_sync.pl
/libexec/ld-elf.so.1: /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Math/BigInt/GMP/GMP.so: Undefined symbol "__gmpz_init_set_str"

Full disclosure, I posted this on dev shed perl, but not getting any help. I'm thinking this more of a installation issues. Any suggestions on how to test or debug greatly appreciated.

Thanks!
 
Just to be on the safe side: /usr/bin/perl5 (and /usr/bin/perl for that matter) is usually a symlink to the real binary, e.g.
Code:
/usr/bin/perl5 -> /usr/local/bin/perl5.12.2

Is your symlink pointing to the correct(ly installed) Perl binary? Did you remove all traces of the 'wrong Perl install'? Did you install your Perl modules from ports, and did you do that after installing the Perl version you're using now? Have you tried recursively rebuilding Perl and all of its dependencies in one go?
 
DutchDaemon said:
/usr/bin/perl5 (and /usr/bin/perl for that matter) is usually a symlink to the real binary

Wow, I never noticed that. I checked and it looks as though these are all pointing to /usr/local/bin/perl5.8.8. I tried using #!/usr/local/bin/perl5.8.8 at the top of the script and still no luck.

Have you tried recursively rebuilding Perl and all of its dependencies in one go?

As in...
Code:
cd /usr/ports/lang/perl5
make deinstall clean reinstall clean

Or is there a better way of doing this?
 
No, that's just a reinstall of Perl itself. If you're not using portupgrade or portmaster (which support recurvise reinstalls), your best bet may be to (indeed) first reinstall Perl, and then run [cmd=]pkg_info -R perl\*[/cmd] to find all the ports that depend on Perl, and rebuild those. Note that portupgrade/portmaster make this way, way easier .. If you're not running either, go with portmaster. No dependencies needed.
 
Back
Top