user1263746
user1263746

Reputation: 6308

Cant install DBI.pm & DBD.pm for RHEL to run perl scripts

I am trying to execute a perl script that interacts with mysql database. I am on RHEL 5.5 and my mysql version is 5.0.77. And it returned error that it requires DBI.pm module for perl. I tried to install it via cpan, using perl -MCPAN -e "install DBI.pm". It tries to some ftp server which times out.

I tried manually install from repo of cpan. DBI.pm installed properly and I proceeded with DBD.pm but cpan repo has DBD.pm only for mysql 4.

I am lost... any pointers?

Upvotes: 2

Views: 7590

Answers (3)

rliberal
rliberal

Reputation: 53

it works for me!

perl -MCPAN -e "install DBI"

Upvotes: 0

user1263746
user1263746

Reputation: 6308

RHEl 5.5 64 bit has Perl 5.08 which does not support DBD and DBI, one needs to upgrade the Perl to atleast 5.10 to get things working. Yet to figure out how to do the upgrade.

Upvotes: -1

rjh
rjh

Reputation: 50294

You're on RHEL, so why not install via yum?

yum install perl-DBD-mysql

In general, if you want to install a perl package via yum, you can do

yum install 'perl(Module::Name)'

Upvotes: 5

Related Questions