Public key for mysql....rpm is not installed
在centos下用yum安装mysql时,抛出此问题。
[root@freeman opt]# yum install -y mysql-server mysql mysql-deve Loaded plugins: security base | 1.1 kB 00:00 epel | 3.7 kB 00:00 epel/primary_db | 3.3 MB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 Setting up Install Process No package mysql-deve available. Resolving Dependencies --> Running transaction check ---> Package mysql.i386 0:5.0.95-5.el5_9 set to be updated --> Processing Dependency: libc.so.6(GLIBC_2.4) for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.1.3) for package: mysql --> Processing Dependency: libnsl.so.1 for package: mysql --> Processing Dependency: libm.so.6 for package: mysql --> Processing Dependency: perl(DBI) for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.2) for package: mysql --> Processing Dependency: libz.so.1 for package: mysql --> Processing Dependency: libc.so.6 for package: mysql --> Processing Dependency: libpthread.so.0(GLIBC_2.0) for package: mysql --> Processing Dependency: libpthread.so.0 for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.3) for package: mysql --> Processing Dependency: libcrypt.so.1 for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.3.4) for package: mysql --> Processing Dependency: libncursesw.so.5 for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.1) for package: mysql --> Processing Dependency: libssl.so.6 for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.1.2) for package: mysql --> Processing Dependency: libcrypto.so.6 for package: mysql --> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: mysql --> Processing Dependency: libstdc++.so.6(CXXABI_1.3) for package: mysql --> Processing Dependency: libstdc++.so.6 for package: mysql --> Processing Dependency: libc.so.6(GLIBC_2.0) for package: mysql --> Processing Dependency: libpthread.so.0(GLIBC_2.2) for package: mysql --> Processing Dependency: libgcc_s.so.1 for package: mysql --> Processing Dependency: libpthread.so.0(GLIBC_2.1) for package: mysql --> Processing Dependency: libpthread.so.0(GLIBC_2.3.2) for package: mysql ---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated ---> Package mysql-server.x86_64 0:5.0.95-5.el5_9 set to be updated --> Processing Dependency: perl-DBD-MySQL for package: mysql-server --> Running transaction check --> Processing Dependency: glibc = 2.5-118.el5_10.2 for package: glibc-devel --> Processing Dependency: glibc = 2.5-118.el5_10.2 for package: nscd --> Processing Dependency: glibc = 2.5-118.el5_10.2 for package: glibc-headers ---> Package glibc.i686 0:2.5-123.el5_11.1 set to be updated --> Processing Dependency: glibc-common = 2.5-123.el5_11.1 for package: glibc ---> Package glibc.x86_64 0:2.5-123.el5_11.1 set to be updated ---> Package libgcc.i386 0:4.1.2-55.el5 set to be updated ---> Package libgcc.x86_64 0:4.1.2-55.el5 set to be updated --> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: libstdc++-devel --> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: gcc-c++ ---> Package libstdc++.i386 0:4.1.2-55.el5 set to be updated ---> Package libstdc++.x86_64 0:4.1.2-55.el5 set to be updated ---> Package ncurses.i386 0:5.5-24.20060715 set to be updated ---> Package openssl.i686 0:0.9.8e-32.el5_11 set to be updated --> Processing Dependency: libgssapi_krb5.so.2 for package: openssl --> Processing Dependency: libkrb5.so.3(krb5_3_MIT) for package: openssl --> Processing Dependency: libk5crypto.so.3 for package: openssl --> Processing Dependency: libk5crypto.so.3(k5crypto_3_MIT) for package: openssl --> Processing Dependency: libcom_err.so.2 for package: openssl --> Processing Dependency: libkrb5.so.3 for package: openssl ---> Package openssl.x86_64 0:0.9.8e-32.el5_11 set to be updated ---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated ---> Package perl-DBI.x86_64 0:1.52-2.el5 set to be updated ---> Package zlib.i386 0:1.2.3-7.el5 set to be updated --> Running transaction check --> Processing Dependency: e2fsprogs-libs = 1.39-36.el5_9 for package: e2fsprogs ---> Package e2fsprogs-libs.i386 0:1.39-37.el5 set to be updated --> Processing Dependency: libdevmapper.so.1.02 for package: e2fsprogs-libs ---> Package e2fsprogs-libs.x86_64 0:1.39-37.el5 set to be updated ---> Package gcc-c++.x86_64 0:4.1.2-55.el5 set to be updated --> Processing Dependency: gcc = 4.1.2-55.el5 for package: gcc-c++ ---> Package glibc-common.x86_64 0:2.5-123.el5_11.1 set to be updated ---> Package glibc-devel.x86_64 0:2.5-123.el5_11.1 set to be updated ---> Package glibc-headers.x86_64 0:2.5-123.el5_11.1 set to be updated --> Processing Dependency: krb5-libs = 1.6.1-71.el5_10.1 for package: krb5-workstation ---> Package krb5-libs.i386 0:1.6.1-80.el5_11 set to be updated --> Processing Dependency: libkeyutils.so.1 for package: krb5-libs --> Processing Dependency: libselinux.so.1 for package: krb5-libs --> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs ---> Package krb5-libs.x86_64 0:1.6.1-80.el5_11 set to be updated ---> Package libstdc++-devel.x86_64 0:4.1.2-55.el5 set to be updated ---> Package nscd.x86_64 0:2.5-123.el5_11.1 set to be updated --> Running transaction check --> Processing Dependency: device-mapper = 1.02.67-2.el5 for package: device-mapper-event ---> Package device-mapper.i386 0:1.02.67-2.el5_11.1 set to be updated --> Processing Dependency: libsepol.so.1 for package: device-mapper ---> Package device-mapper.x86_64 0:1.02.67-2.el5_11.1 set to be updated ---> Package e2fsprogs.x86_64 0:1.39-37.el5 set to be updated --> Processing Dependency: gcc = 4.1.2-54.el5 for package: gcc-gfortran ---> Package gcc.x86_64 0:4.1.2-55.el5 set to be updated --> Processing Dependency: cpp = 4.1.2-55.el5 for package: gcc ---> Package keyutils-libs.i386 0:1.2-1.el5 set to be updated ---> Package krb5-workstation.x86_64 0:1.6.1-80.el5_11 set to be updated ---> Package libselinux.i386 0:1.33.4-5.7.el5 set to be updated --> Running transaction check ---> Package cpp.x86_64 0:4.1.2-55.el5 set to be updated ---> Package device-mapper-event.x86_64 0:1.02.67-2.el5_11.1 set to be updated ---> Package gcc-gfortran.x86_64 0:4.1.2-55.el5 set to be updated --> Processing Dependency: libgfortran = 4.1.2-55.el5 for package: gcc-gfortran ---> Package libsepol.i386 0:1.15.2-3.el5 set to be updated --> Running transaction check ---> Package libgfortran.x86_64 0:4.1.2-55.el5 set to be updated epel/filelists_db | 4.5 MB 00:00 --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================== Package Arch Version Repository Size ========================================================================================================== Installing: mysql i386 5.0.95-5.el5_9 base 4.9 M mysql x86_64 5.0.95-5.el5_9 base 4.9 M mysql-server x86_64 5.0.95-5.el5_9 base 9.9 M Installing for dependencies: device-mapper i386 1.02.67-2.el5_11.1 updates 804 k e2fsprogs-libs i386 1.39-37.el5 base 120 k glibc i686 2.5-123.el5_11.1 updates 5.4 M keyutils-libs i386 1.2-1.el5 base 18 k krb5-libs i386 1.6.1-80.el5_11 updates 670 k libgcc i386 4.1.2-55.el5 base 97 k libselinux i386 1.33.4-5.7.el5 base 77 k libsepol i386 1.15.2-3.el5 base 128 k libstdc++ i386 4.1.2-55.el5 base 364 k ncurses i386 5.5-24.20060715 base 1.1 M openssl i686 0.9.8e-32.el5_11 updates 1.5 M perl-DBD-MySQL x86_64 3.0007-2.el5 base 148 k perl-DBI x86_64 1.52-2.el5 base 600 k zlib i386 1.2.3-7.el5 base 51 k Updating for dependencies: cpp x86_64 4.1.2-55.el5 base 2.9 M device-mapper x86_64 1.02.67-2.el5_11.1 updates 832 k device-mapper-event x86_64 1.02.67-2.el5_11.1 updates 24 k e2fsprogs x86_64 1.39-37.el5 base 845 k e2fsprogs-libs x86_64 1.39-37.el5 base 120 k gcc x86_64 4.1.2-55.el5 base 5.3 M gcc-c++ x86_64 4.1.2-55.el5 base 3.8 M gcc-gfortran x86_64 4.1.2-55.el5 base 3.5 M glibc x86_64 2.5-123.el5_11.1 updates 4.8 M glibc-common x86_64 2.5-123.el5_11.1 updates 16 M glibc-devel x86_64 2.5-123.el5_11.1 updates 2.4 M glibc-headers x86_64 2.5-123.el5_11.1 updates 602 k krb5-libs x86_64 1.6.1-80.el5_11 updates 683 k krb5-workstation x86_64 1.6.1-80.el5_11 updates 919 k libgcc x86_64 4.1.2-55.el5 base 100 k libgfortran x86_64 4.1.2-55.el5 base 245 k libstdc++ x86_64 4.1.2-55.el5 base 354 k libstdc++-devel x86_64 4.1.2-55.el5 base 2.8 M nscd x86_64 2.5-123.el5_11.1 updates 178 k openssl x86_64 0.9.8e-32.el5_11 updates 1.5 M Transaction Summary ========================================================================================================== Install 17 Package(s) Upgrade 20 Package(s) Total size: 79 M Downloading Packages: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897 base/gpgkey | 1.7 kB 00:00 Public key for mysql-5.0.95-5.el5_9.x86_64.rpm is not installed
此时导入rpm的签名信息即可,用root登录,执行下面命令(我的linux版本是centos 5.1)
[root@freeman opt]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
如果是其它版本,例如redhat,执行以下命令
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
OK,问题解决
参考文章:http://www.cnblogs.com/JemBai/archive/2012/11/07/2759140.html
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。