I'm new in Perl, I installed the DBI module but when I try to run my script I get this error:
Can't locate DBI.pm in @INC (you may need to install the DBI module) (@INC contains:
/usr/lib/x86_64-linux-gnu/perl5/5.20/DBI.pm
/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux
/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1
/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux
/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1
.
) at call_request.pl line 12.
[Line breaks added for readability]
I know there is another topic with the same subject but no answer. I have no idea what I can do.. ?
I'm on linux (ubutunu)
Thanks for help !
Edit :
Output :
perl est /home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/bin/perl
cpan est /home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/bin/cpan
#!/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/bin/perl
eval 'exec /home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
grep arg
make_arg []
make_install_arg []
makepl_arg [INSTALLDIRS=site]
mbuild_arg []
mbuild_install_arg []
mbuildpl_arg [--installdirs site]
PERLBREW_PERL: perl-5.20.1
PERLBREW_VERSION: 0.73
PERLBREW_ROOT: /home/heisenberg/perl5/perlbrew
PERLBREW_MANPATH: /home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/man
PERLBREW_HOME: /home/heisenberg/.perlbrew
PERLBREW_BASHRC_VERSION: 0.73
PERLBREW_PATH: /home/heisenberg/perl5/perlbrew/bin:/home/heisenberg/perl5/perlbrew/perls/perl-5.20.1/bin
PERL5LIB: /usr/lib/x86_64-linux-gnu/perl5/5.20/DBI.pm
You need to install DBI using the
perl
for which you want available. You said you've already done this, but that's obviously not the case. Normally, you'd do the following, but maybe you have a messed up systemIf that doesn't work, add the output of the following to your question and notify me you've done this by leaving a comment.
PS - Whatever you did to add
/usr/lib/x86_64-linux-gnu/perl5/5.20/DBI.pm
to@INC
is wrong! Get rid of it.The problems were caused by the use
su
, which would cause the systemperl
to be used instead of theperlbrew
-installedperl
.