zbx-sadman / unifi_proxy

Fast client-server version of UniFi Miner
45 stars 21 forks source link

Error Can't localte JSON.pm #12

Closed luigdima closed 7 years ago

luigdima commented 7 years ago

Hello!

When execute it the command 'unifi_proxy.pl' i returned this message:

root@zabbix:/# unifi_proxy.pl 
Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/local/sbin/unifi_proxy.pl line 16.
BEGIN failed--compilation aborted at /usr/local/sbin/unifi_proxy.pl line 16.

I have already installed the packages:

aptitude install libjson-xs-perl libwww-perl libio-socket-ssl-perl libdata-dumper-simple-perl libtime-hires-perl

I need any more packages?

Thanks!! =)

zbx-sadman commented 7 years ago

Hello, Luis

Thanks for question. I made an omission in the manual. Since v1.3.4 released you need to install JSON wrapper module to be able to choose between JSON packends (XS, PP or Cpanel). Just use aptitude install libjson-perl command.

You must see it in list of installed modules:

# dpkg --get-selections | grep libjson
libjson-perl                                      install
libjson-xs-perl                                   install

libjson is an JSON wrapper and libjson-xs is an fast JSON-backend.

luigdima commented 7 years ago

Hi!

Perfect! Already working =) thank you very much!

Solved!