Discussion:
[rancid] Rancid 3.2 issue with perl/inet_pton
Magnus Ringdahl
2015-03-23 08:55:53 UTC
Permalink
Hi,
I'm having issues with rancid since i upgraded (removed old and installed 3.2) rancid.
I'm getting no output from rancid-run, but I get the following from rancid -d.

"inet_pton" is not exported by the Socket module
Can't continue after import errors at /usr/local/rancid/lib/rancid/rancid.pm line 51
BEGIN failed--compilation aborted at /usr/local/rancid/lib/rancid/rancid.pm line 51.
Compilation failed in require at ./rancid line 61.
BEGIN failed--compilation aborted at ./rancid line 61.


Anyone seen this before, couldn't find much about this issue.
I'm running this on Debian 2.6.32-5-686 with Perl 5.10.1-17squeeze2.

Med vänlig hälsning/Kind Regards,

[cid:***@mullet.se]

Magnus Ringdahl
Lagmansgatan 4B
214 66 Malmö
M: 0766-34 88 86
T: 040-670 76 90

http://www.excellent-hosting.se
Nick Hilliard
2015-03-23 10:22:16 UTC
Permalink
_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley
2015-03-23 19:58:00 UTC
Permalink
you need to update the perl Socket module from CPAN.  Socket-2.018
should work fine.<br>
Thanks. It appears that 2.006 is sufficient, fwiw. This patch adds runtime
& configtime checks: ftp://ftp.shrubbery.net/pub/rancid/rancid-3.2.p3.gz
Nick Hilliard
2015-03-30 12:02:11 UTC
Permalink
[replying to list]

if you're running an older perl version, e.g. 5.10, you need to explicitly
install a recent version of Socket because the version installed in the
perl core is outdated.

I don't know about Centos but on debian, you can do this using something like:

# apt-get install dh-make-perl
# dh-make-perl --build --core-ok --cpan ExtUtils::Constant
# dpkg -i ./libextutils-constant-perl*.deb
# dh-make-perl --build --core-ok --cpan Socket
# dpkg -i ./libsocket-perl*.deb

The intermediate installation of ExtUtils::Constant is only required to
enable CPAN to work properly.

Nick
Hi Guys
I’ve been affected by this as well upgrading a centos 6.5 rancid 3.1
installation to 3.2 - and I haven’t been able to figure out the cpan
socket module update to resolve as yet.
sudo perl -MCPAN -e "upgrade /(.\*)/"
Trying to get all of the configs.
"inet_pton" is not exported by the Socket module
Can't continue after import errors at /home/rancid/lib/rancid/rancid.pm
line 52
BEGIN failed--compilation aborted at /home/rancid/lib/rancid/rancid.pm
line 52.
Compilation failed in require at /home/rancid/bin/rancid line 61.
BEGIN failed--compilation aborted at /home/rancid/bin/rancid line 61.

Apologies this is not strictly speaking rancid related directly. Could the
patch provided resolve this if I ran the upgrade again?
Cheers, Jos
Post by heasley
you need to update the perl Socket module from CPAN. Socket-2.018
should work fine.<br>
Thanks. It appears that 2.006 is sufficient, fwiw. This patch adds runtime
& configtime checks: ftp://ftp.shrubbery.net/pub/rancid/rancid-3.2.p3.gz
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Jos
2015-03-30 22:19:09 UTC
Permalink
Thanks Nick, that’s what I needed. For what it’s worth the Centos 6.5
manual perl update from 5.10 went like this:

===
cd /usr/local/src
sudo wget
http://search.cpan.org/CPAN/authors/id/S/SH/SHAY/perl-5.20.2.tar.gz
sudo tar -xvzf perl-5.20.2.tar.gz
cd perl-5.20.2
sudo ./Configure -des
sudo make
sudo make test
sudo make install


"Warning: perl appears in your path in the following locations beyond where
we just installed it:
/usr/bin/perl


Perl -v gave me “This is perl, v5.10.1” still so I did this:

sudo mv /usr/bin/perl /usr/bin/perl.old
sudo ln -s /usr/local/bin/perl /usr/bin/perl






Rancid-run then worked but cvsweb.cgi broke giving internal server errors
and code 500. I modified perl reference in first line of cvsweb.cgi to
“#!/usr/bin/perl.old -T"
…and all is fine again, as fine as it gets running centos anyway...






Cheers, Jos
Post by Nick Hilliard
[replying to list]
if you're running an older perl version, e.g. 5.10, you need to explicitly
install a recent version of Socket because the version installed in the
perl core is outdated.
# apt-get install dh-make-perl
# dh-make-perl --build --core-ok --cpan ExtUtils::Constant
# dpkg -i ./libextutils-constant-perl*.deb
# dh-make-perl --build --core-ok --cpan Socket
# dpkg -i ./libsocket-perl*.deb
The intermediate installation of ExtUtils::Constant is only required to
enable CPAN to work properly.
Nick
Erlington Espinoza
2016-01-07 17:50:23 UTC
Permalink
Hey Guys you saved my *** right there with these instructions.

Do you know how can I tell Rancid to use the specific version of perl
(compiled one) but keep as system default perl 5.10?
Alan McKinnon
2016-01-07 20:03:34 UTC
Permalink
Post by Erlington Espinoza
Hey Guys you saved my *** right there with these instructions.
Do you know how can I tell Rancid to use the specific version of perl
(compiled one) but keep as system default perl 5.10?
assuming the new perl is in /usr/local/bin, put that directory as the
beginning of PATH for the rancid user.

Or, edit the shebang for every file. But that's a pain and doesn't
survive upgrades and recompiles
--
Alan McKinnon
***@gmail.com
heasley
2016-01-07 21:30:26 UTC
Permalink
Post by Alan McKinnon
Post by Erlington Espinoza
Hey Guys you saved my *** right there with these instructions.
Do you know how can I tell Rancid to use the specific version of perl
(compiled one) but keep as system default perl 5.10?
assuming the new perl is in /usr/local/bin, put that directory as the
beginning of PATH for the rancid user.
Or, edit the shebang for every file. But that's a pain and doesn't
survive upgrades and recompiles
you can also
export PERLV_PATH=/path/to/perl5
./configure

Loading...