LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Perl DBI version does not match (http://www.linuxquestions.org/questions/linux-software-2/perl-dbi-version-does-not-match-949376/)

zuzoa 06-09-2012 09:33 AM

Perl DBI version does not match
 
I am trying to install ZoneMinder, and it fails during configure here:
Quote:

checking for perl module DBI... no
configure: error: zm requires DBI
==> ERROR: A failure occurred in build().
Aborting...
So I query perl and get this:
Quote:

$ perl -MDBI
Perl API version v5.14.0 of DBI does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/DBI.pm line 266.
Compilation failed in require.
BEGIN failed--compilation aborted.
Perl is indeed v5.16.0 as noted by these:
Quote:

$ perl --version

This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux-thread-multi
Quote:

$ pacman -Q perl
perl 5.16.0-2
And perl-dbi is the latest version as noted here:
Quote:

$ pacman -Q perl-dbi
perl-dbi 1.618-2
Quote:

$ sudo perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install DBI
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 09 Jun 2012 12:39:03 GMT
DBI is up to date (1.622).
I have zero experience with Perl, so can anyone tell me what I'm doing wrong here? It does look like there is a difference in versions (1.622 from CPAN and 1.618-2 from pacman) but I don't know how to go about fixing it.

Thank you in advance.

knudfl 06-10-2012 03:47 AM

Perl 5.16 was released a "few days ago" : 20 May 2012.

Suggest : Revert to perl-5.14, or whatever stable you had before.

Version 5.16 may still be considered experimental.
Not included in any (other) Linux OS. AFAIK.

zuzoa 06-12-2012 05:31 PM

Thank you very much. I rolled back to 5.14.2-7 and it's working perfectly.

CTM 06-24-2012 08:37 PM

Perl 5.16 is perfectly stable. This problem is occurring because the version of DBI installed on your machine contains XS (essentially C) code that was compiled against Perl 5.14, which DynaLoader is trying to load in Perl 5.16 (which doesn't work). Either the DBI packager for your distro needs to rebuild DBI against the (newer) Perl in the distro's repository, or you can rebuild it yourself by installing it from CPAN:

Code:

# cpanp -i --force DBI
(The latter technique will probably overwrite files installed by your DBI package, which might cause inconsistencies in the installed package database - I don't know how much pacman cares about those things. If you're doing to do this, remove the DBI package first.)


All times are GMT -5. The time now is 12:02 PM.