Centos 7 上的 Mysql 5.7 - cpio:读取失败 - 没有此文件或目录

Centos 7 上的 Mysql 5.7 - cpio:读取失败 - 没有此文件或目录

我尝试在 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)

答案1

我从机器上删除 RPM 文件并再次运行 chef-client 后,能够修复此问题,chef-client 也成功完成。chef-client 第一次在机器上运行后,文件不知何故被损坏了。

相关内容