当我运行sudo yum update时候,我遇到了这个错误
Downloading packages: No Presto metadata available for base python-augeas-0.5.0-2.el7.noarch.rpm | 25 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : python-augeas-0.5.0-2.el7.noarch 1/2 Error unpacking rpm package python-augeas-0.5.0-2.el7.noarch error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info: cpio: rename Verifying : python-augeas-0.5.0-2.el7.noarch 1/2 python-augeas-0.4.1-5.el7.noarch was supposed to be removed but is not! Verifying : python-augeas-0.4.1-5.el7.noarch 2/2 Failed: python-augeas.noarch 0:0.4.1-5.el7 python-augeas.noarch 0:0.5.0-2.el7 Complete!
我看到更新正在期待一个文件被删除。 我的计划是find它并删除,然后再次尝试更新。 但是, find -iname "python-augeas-0.4.1-5.el7.noarch"不会为我返回任何东西,所以我怀疑删除那个文件是要走的路。
无可否认,我不是一个系统pipe理员,甚至是非常能干的。 任何帮助表示赞赏。 谢谢。
编辑1:
正如Michael Hampton所build议的,这里是权限和属性:
$ ls -ld /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info drwxr-xr-x. 2 root root 4096 Jun 29 2015 /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info $ lsattr -d /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info ---------------- /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info
编辑2:
我卸载与sudo yum remove python-augeas 。 然后我重新安装了以下错误:
$ sudo yum install python-augeas Loaded plugins: fastestmirror, langpacks, remove-with-leaves Loading mirror speeds from cached hostfile * base: mirrors.rit.edu * epel: mirror.steadfast.net * extras: centos.chi.host-engine.com * nux-dextop: mirror.li.nux.ro * updates: mirrors.rit.edu Resolving Dependencies --> Running transaction check ---> Package python-augeas.noarch 0:0.5.0-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================== Installing: python-augeas noarch 0.5.0-2.el7 base 25 k Transaction Summary ====================================================================================================================================================== Install 1 Package Total download size: 25 k Installed size: 71 k Is this ok [y/d/N]: y Downloading packages: python-augeas-0.5.0-2.el7.noarch.rpm | 25 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python-augeas-0.5.0-2.el7.noarch 1/1 Error unpacking rpm package python-augeas-0.5.0-2.el7.noarch error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info: cpio: rename Verifying : python-augeas-0.5.0-2.el7.noarch 1/1 Failed: python-augeas.noarch 0:0.5.0-2.el7 Complete!
编辑3:
迈克尔汉普顿是正确的有关我的目录的权限:
$ ls -ld /usr/lib/python2.7/site-packages/ drwxr-xr-x. 161 root root 12288 Jan 14 12:47 /usr/lib/python2.7/site-packages/
解:
sudo chmod 777 /usr/lib/python2.7/site-packages/ sudo yum install -y python-augeas
发生这种情况是因为yum无法删除指定文件的旧副本/usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info 。
这可能是因为权限设置不正确,或者设置了不可变属性。
检查指定文件/目录以及包含目录的权限和属性,并修复所有问题。 然后再次尝试更新。
ls -ld /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info lsattr -d /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info ls -ld /usr/lib/python2.7/site-packages lsattr -d /usr/lib/python2.7/site-packages