同事在Oracle Linux Server release 5.7用yum安装perl-DBD-MySQL,发现yum不能用。

原因是: /etc/yum.repos.d目录下并没有相应的repo文件。

解决方法: 手工去 http://public-yum.oracle.com下载对应版本的reop文件即可。

过程如下:
#cat /etc/issue
Oracle Linux Server release 5.7
Kernel \r on an \m

#yum -y install perl-DBD-MySQL
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Nothing to do

#cd /etc/yum.repos.d
#wget http://public-yum.oracle.com/public-yum-el5.repo
--2014-11-13 13:23:45--  http://public-yum.oracle.com/public-yum-el5.repo
Connecting to 192.168.0.190:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 4790 (4.7K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[==========================================================================================>] 4,790       --.-K/s   in 0.08s  

2014-11-13 13:23:46 (60.0 KB/s) - `public-yum-el5.repo' saved [4790/4790]

# yum install -y perl-DBD-MySQL
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
el5_latest                                                                                                   | 1.4 kB     00:00    
el5_latest/primary                                                                                           |  23 MB     01:00    
el5_latest                                                                                                              13910/13910
ol5_UEK_latest                                                                                               | 1.2 kB     00:00    
ol5_UEK_latest/primary                                                                                       |  17 MB     00:47    
ol5_UEK_latest                                                                                                              364/364
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Running transaction check
---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                           Arch                      Version                            Repository                     Size
====================================================================================================================================
Installing:
 perl-DBD-MySQL                    x86_64                    3.0007-2.el5                       el5_latest                    147 k
Installing for dependencies:
 mysql                             x86_64                    5.0.95-5.el5_9                     el5_latest                    4.9 M

Transaction Summary
====================================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 5.0 M
Downloading Packages:
(1/2): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm                                                                | 147 kB     00:00    
(2/2): mysql-5.0.95-5.el5_9.x86_64.rpm                                                                       | 4.9 MB     00:15    
------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                               317 kB/s | 5.0 MB     00:16    
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
el5_latest/gpgkey                                                                                            | 1.4 kB     00:00    
Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mysql                                                                                                        1/2
  Installing     : perl-DBD-MySQL                                                                                               2/2

Installed:
  perl-DBD-MySQL.x86_64 0:3.0007-2.el5                                                                                             

Dependency Installed:
  mysql.x86_64 0:5.0.95-5.el5_9                                                                                                    

Complete!

Logo

更多推荐