我试图在centos 7上安装mysql 5.7,我得到了下面的错误,
我能够在不同的机器上成功安装不止一次的centos 7,但是这是我第一次遇到这个问题。
任何想法为什么发生和如何解决?
# cat /etc/*-release CentOS Linux release 7.3.1611 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.3.1611 (Core) CentOS Linux release 7.3.1611 (Core)
*
# yum install cpio -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.heanet.ie * extras: ftp.heanet.ie * updates: ftp.heanet.ie Package cpio-2.11-24.el7.x86_64 already installed and latest version Nothing to do
*
# rpm -U /tmp/mysql-community-client-5.7.16-1.el7.x86_64.rpm error: unpacking of archive failed on file /usr/bin/mysqladmin;585801cb: cpio: read failed - No such file or directory error: mysql-community-client-5.7.16-1.el7.x86_64: install failed
*
* remote_file[/tmp/mysql-community-client-5.7.16-1.el7.x86_64.rpm] action create (up to date) * rpm_package[mysql-community-client-5.7.16-1.el7.x86_64.rpm] action install ================================================================================ Error executing action `install` on resource 'rpm_package[mysql-community-client-5.7.16-1.el7.x86_64.rpm]' ================================================================================ Chef::Exceptions::Exec ---------------------- rpm -U /tmp/mysql-community-client-5.7.16-1.el7.x86_64.rpm returned 1, expected 0 Resource Declaration: --------------------- 24: rpm_package pkg do 25: source "/tmp/#{pkg}" 26: action :install 27: end 28: Compiled Resource: ------------------ rpm_package("mysql-community-client-5.7.16-1.el7.x86_64.rpm") do provider Chef::Provider::Package::Rpm action [:install] retries 0 retry_delay 2 package_name "mysql-community-client-5.7.16-1.el7.x86_64.rpm" source "/tmp/mysql-community-client-5.7.16-1.el7.x86_64.rpm" version "5.7.16-1.el7" recipe_name "mysql57_centos7" end ERROR: rpm_package[mysql-community-client-5.7.16-1.el7.x86_64.rpm] had an error: Chef::Exceptions::Exec: rpm -U /tmp/mysql-community-client-5.7.16-1.el7.x86_64.rpm returned 1, expected 0 FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
我能够解决这个问题,厨师客户端成功完成后,我从机器上删除RPM文件,并再次运行厨师客户端。 不知何故,第一次,厨师的客户端运行在机器上的文件被破坏。