MySQLをインストールしようとしたらperl(DBI)と出た
MySQLをインストールしようとしたらperl(DBI)と出た
0.改訂履歴
1.はじめに
このドキュメントでは,MySQLをRPMでインストールしようとした時に,「Perl(DBI)が無い」というエラー(perl(DBI) is needed by MySQL-とかエラー: 依存性の欠如とか)が出た場合に,Perl-DBIをインストールする手順を説明する.
なお,ここで利用しているOSは,CentOS5.1である.
2.現象
- MySQLのRPMをインストールしようとしたら,次のようなエラーが出る
[root@localhost InstallBin]# rpm -ihv MySQL-server-community-5.0.51a-0.rhel5.i386.rpm
error: Failed dependencies:
perl(DBI) is needed by MySQL-server-community-5.0.51a-0.rhel5.i386
[root@localhost InstallBin]#
|
- dependenciesなので,依存関係があり,perl-DBIがインストールされてないのでこのモジュールをインストールできない事がわかる.
3.perl-DBIをインストール
- yumを使って,perl-DBIをインストールする.
[root@localhost InstallBin]# yum install perl-DBI
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-DBI to pack into transaction set.
perl-DBI-1.52-1.fc6.i386. 100% |=========================| 16 kB 00:00
---> Package perl-DBI.i386 0:1.52-1.fc6 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
perl-DBI i386 1.52-1.fc6 base 605 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 605 k
Is this ok [y/N]:
|
Is this ok [y/N]: y
Downloading Packages:
(1/1): perl-DBI-1.52-1.fc 100% |=========================| 605 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-DBI ######################### [1/1]
Installed: perl-DBI.i386 0:1.52-1.fc6
Complete!
[root@localhost InstallBin]#
|
- perl-DBIのインストールは完了.
- MySQLのモジュールをインストールしてみる.
[root@localhost InstallBin]# rpm -ihv MySQL-client-community-5.0.51a-0.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client-community ########################################### [100%]
[root@localhost InstallBin]#
|