shan_emails has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,
when i use the code "use DBI;" it shows the following error.

DBI object version 1.602 does not match $DBI::VERSION 1.48 at C:/perl/lib/DynaLoader.pm line 253. BEGIN failed--compilation aborted at ..\softwares\editor/DBI.pm line 254. Compilation failed in require at insertsql.cgi line 3. BEGIN failed--compilation aborted at insertsql.cgi line 3.

Note: For this i tried uninstall the DBI thro' ppm after that i install DBI. Then also i shows the same error.
Please guide me how can i proceed.

Thanks in advance.
Shanmugam A.

Replies are listed 'Best First'.
Re: while Debuging shows Error
by graff (Chancellor) on Sep 20, 2008 at 17:26 UTC
    I haven't seen that sort of symptom before, but it looks like you might have more than one installation of DBI, and at least one of those installations seems to be incomplete.

    The first thing I would try would be a test like this, to see where Perl is finding DBI-related stuff on your system:

    perl -le 'for $p (@INC) { print $p; opendir(P,$p); print join("\n",grep /DBI/,readdir(P))}'
    That comand line assumes a bash-like shell. If you are using the "default" ms-windows shell, just save the part between single quotes into a "test.pl" file, and do perl -l test.pl

    Look at the dates of all the DBI-related files, and delete the ones that are older than the date of your most recent attempt to install the module. I'm not completely sure that it will help, but it's worth a try.

Re: while Debuging shows Error
by koolgirl (Hermit) on Sep 20, 2008 at 17:22 UTC
Re: while Debuging shows Error
by Anonymous Monk on Sep 20, 2008 at 17:01 UTC
    kill all perl processes reinstall DBI