10

After a fresh install of centOS 6 i tried to install ddclient so i can update my DNS records on Cloudflare and I have configured it correctly as instructed on the Cloudflare site and other sites, when i try to run the debug command

ddclient -daemon=0 -debug -verbose -noquiet

I get this error

FATAL:    Error loading the Perl module JSON::Any needed for cloudflare update.

And I tried to install perl-JSON using yum install perl-JSON but did nothing

Revo
  • 530
  • 7
  • 14
  • 1
    The module is JSON::Any, not JSON, so the package name is perl-JSON-Any. – ThisSuitIsBlackNot Oct 06 '15 at 21:31
  • tried that, still nothing – Revo Oct 06 '15 at 21:51
  • Just to clarify, "still nothing" is shorthand for "I successfully installed the perl-JSON-Any package but I still get the same error from `ddclient`", correct? – ThisSuitIsBlackNot Oct 06 '15 at 21:59
  • No, the package was not found, i even tried using cpan JSON and cpan JSON::Any, and i still get the same error. – Revo Oct 06 '15 at 22:02
  • perl-JSON-Any is in [EPEL](https://fedoraproject.org/wiki/EPEL), you'll have to enable the repository if you want to install packages from it. Alternatively, you can download the rpm and install it manually. And now the same question as before: when you say "i even tried using cpan JSON and cpan JSON::Any, and i still get the same error," do you mean that `cpan JSON::Any` installed the module successfully but you still get the same error from `ddclient`? – ThisSuitIsBlackNot Oct 06 '15 at 22:13
  • Yes, it installed, and the error stand still. – Revo Oct 06 '15 at 22:29
  • And where did it get installed? If it's not in the `@INC` path for the version of perl that ddclient is using ([apparently `/usr/bin/perl`](http://sourceforge.net/p/ddclient/code/HEAD/tree/trunk/ddclient)), ddclient won't be able to find it. – ThisSuitIsBlackNot Oct 06 '15 at 22:39
  • I tried to edit the comment and seems it didn't work (I'm new to stackoverflow question asking) so what happened is this, I enabled EPEL repo, then tried to find perl-JSON-Any package in yum and found it, I installed it successfully, and then managed to run ddclient with debug parameters, it ran, the FATAL error wasn't there, but i got another error :( that is Use of uninitialized value $fam_listen in numeric ne (!=) at /usr/share/perl5/IO/Socket/INET6.pm line 226 well, guess i will stop here for now, thank you sir for your time :) – Revo Oct 06 '15 at 22:42
  • Did you [configure it properly](http://sourceforge.net/p/ddclient/wiki/Home/#configuration)? I would recommend reading through the documentation on the project page. – ThisSuitIsBlackNot Oct 06 '15 at 22:45
  • i did read it and configure it properly, i enabled the line to get my ip address from checkip.dyndns.com (the whole line by removing #) then added my cloudflare credential, email, api key, zone, and the record to update, protocol is equal to cloudflare and the server to www.cloudflare.com, i dont see anything wrong here, the ssl=yes option is there too as the cloudflare support page said, and i changed deamon to value 600, now i tried to log the terminal since this gets in a loop, and this loop starts right after it tries to connect to cloudflare (CONNECT: www.cloudflare.com) – Revo Oct 06 '15 at 23:08

2 Answers2

9

You can try

sudo cpan install JSON::Any
Kostas D
  • 91
  • 1
  • 4
4

This is a long time passed, but I found a solution to the same issue I had on Ubuntu here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873750

Adding libjson-any-perl satisfies this dependency.

So did apt-get install libjson-any-perl and now there is no error.

Edit: Cloudflare changed its API version since this was actual which ddclient is not compatible with.

Ante
  • 85
  • 2
  • 8