Change the current cpanel version to stable :

vi /etc/cpupdate.conf
CPANEL=stable

/scripts/upcp –force

/scripts/perlinstaller –force Encode::Detect::Detector

If that doesn’t work, please try

/scripts/autorepair encodedetectfix

No luck? then do:

type cpan and from cpan mode type below.

install Detect::Module

If none of the above solution worked, then  there is a temp workaround for manual install.

wget http://search.cpan.org/CPAN/authors/…ct-1.00.tar.gz
unpack it
perl Makefile.PL
vi Detector.xs

Add this patch to Detector.xs

*** 38,43 ****
#define PERL_NO_GET_CONTEXT /* we want efficiency */
#include .EXTERN.h.
#include .perl.h.
+ #undef HASATTRIBUTE_UNUSED
#include .XSUB.h.
}

Then run Build, make etc.