I tried to install mysql 5.7 on centos 7 and I got the below error,
I was able to install successfully more than one time on different machines with centos 7, but this is the first time I encountered this issue.
Any idea why it's happening and how to fix ?
# 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)
I was able to fix this issue and chef-client complete successfully after I removed the RPM files from the machine, and run again chef-client. Somehow the files were corrupted from the first time that chef-client ran on the machine.