in reply to Using a different module version than the one installed

Encode object version 2.68 does not match bootstrap parameter 2.87

Version 2.87 of Encode.pm is being found ok, but the Encode.dll for version 2.87 is not being found.
If version 2.87 of Encode.pm is in the "..\lib_ext" folder, then its Encode.dll should be found in the ..\lib_ext\auto\Encode folder.

That dll is not part of the Encode source distribution. It gets created when you build the Encode module by running "perl Makefile.PL", then "make test". (It would then normally be installed into the correct location when you run "make install".)
If you haven't done the build, then the required Encode.dll won't even exist and Encode will be unusable.
You need to build that dll, and get it placed in the correct location.

UPDATE: I assumed that the server running the Perl CGI scripts was on a Windows system. On re-reading the original post I now realize that might not be so. Is the server running on MicroSoft Windows ?

Cheers,
Rob
  • Comment on Re: Using a different module version than the one installed

Replies are listed 'Best First'.
Re^2: Using a different module version than the one installed
by soso_ynak (Novice) on Sep 04, 2022 at 05:18 UTC

    Thanks for all your comments, and sorry for my slow response.
    I will explain the situation to all your comments.
    Below are the situations and concerns that I reconfirmed.
    First, the auto directory I installed doesn't contain Encode.dll, it has Encode.xs.dll instead.
    Is this correct?
    And I have the following concerns.
    When I installed Encode 2.87 with Perl on Windows10/XAMPP(standard Encode version: 3.08) by running "perl makefile.pl prefix='c:\xampp\perl\lib_ext'","gmake","gmake test","gmake install" , the following folders/files were generated.

    c:\xampp\perl----\lib |--\lib_ext----\bin |--\lib----\auto----\Encode---- Encode.xs.dl +l | |-- .paclist | |--\Byte | |-- (\JP/\EBCDIC +/...another folder) | |--\Encode---- Alias.pm | |-- Byte.pm | |-- Config.pm | |-- EBCDIC.pm | |-- encode.h | |-- Encoder.pm | |-- Encoding.pm | |-- JP.pm | |-- (Another file) | | |-- Encode.pm |-- encoding.pm |-- perllocal.pod

    Then I copied these to the following directory on the web server(Linux).

    /home/users/0/usrxxxx/web/usr/bin----/lib_ext---- Encode.pm | |-- encoding.pm | |-- perllocal.pod | | | |-- /auto----/Encode---- + Encode.xs.dll | | |-- + .paclist | | |-- +/Byte | | |-- + (\JP/\EBCDIC/...another folder) | | | |-- /Encode---- Alias.pm | |-- Byte.pm | |-- Config.p +m | |-- EBCDIC.p +m | |-- encode.h | |-- Encoder. +pm | |-- Encoding +.pm | |-- JP.pm | |-- (Another + file) | |--( /target directory ---- target s +cript )

    As a result, I got the following error(same as 2nd error) when running the script:

    -- Error3: Encode object version 2.68 does not match bootstrap parameter 2.87 at +/usr/local/perl/5.10/lib/5.10.1/x86_64-linux-thread-multi/DynaLoader. +pm line 223.

    The error when using the server's standard module Encode.pm 2.68 was the 1st error (Encode version 2.87 required--this is only version 2.68 at ../lib_ext/Email/MIME/ContentType.pm line 7.) I posted, but the error after copying above file/folder was the second Error (Encode object version 2.68 does not match bootstrap parameter 2.87 at /usr/local/perl/5.10/lib/5.10.1/x86_64-linux-thread-multi/DynaLoader.pm line 223.), so I think "use lib qw{../lib_ext};" or "BEGIN { unshift(@INC, "../lib_ext") };" in my script works.
    (At least Encode.pm 2.87 is searched, but I think the related files are incorrect. maybe)
    Just in case, I also tried "use FindBin qw($RealBin); use lib "$RealBin/../lib_ext";", but the result was the same.

    I have the following question now.
    I'm very curious what the error on the server, "DynaLoader.pm line 223" means.
    In addition, the following error occurred when the same script was executed on Localhost on Windows/xampp.

    Can't load '(C:/Users/localhost directry)/usr/bin/target folder/../lib +_ext/auto/Encode/Encode.xs.dll' for module Encode: load_file: The spe +cified module could not be found at C:/usr/lib/XSLoader.pm line 93. at C:/Users/localhost directry)/usr/bin/mail_rcv_spam/../lib_ext/Enco +de.pm line 10.

    The "C:/usr/lib/XSLoader.pm line 93" part in this error indicates the path of the standard module of the server.
    Is it impossible to use a different Encode module with the same name just by copying the files/folders installed on Winodws/xampp?
    Or is my installation/copy work wrong?