error:failed to commit transaction(conflicting files) 解决方法

今天在用BlackArch Linux的时候,当执行同步源并更新系统命令“pacman -Syu“时,结果,报了如下错误:

error:failed to commit transaction(conflicting files)
exploitdb:/usr/bin/searchsploit exists in filesystem (owned by searchsploit)
/usr/bin/slugifu2 exists in both 'python2-python-slugifu' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/__init__.py exists in both 'python2-puthon-slugify' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/__init__.pyc exists in both 'python2-puthon-slugify' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/__init__.pyo exists in both 'python2-puthon-slugify' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/slugifu.py exists in both 'python2-puthon-slugify' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/slugifu.pyc exists in both 'python2-puthon-slugify' and 'python2-slugifu'
/usr/lib/python2.7/site-packages/slugify/slugifu.pyo exists in both 'python2-puthon-slugify' and 'python2-slugifu'
......

中文翻译

错误:无法提交事务(冲突的文件)
exploitdb:/ usr / bin / searchsploit存在于filesystem中(由searchsploit拥有)
/ usr / bin / slugifu2存在于'python2-python-slugifu'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/__init__.py存在于'python2-puthon-slugify'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/__init__.pyc存在于'python2-puthon-slugify'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/__init__.pyo存在于'python2-puthon-slugify'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/slugifu.py存在于'python2-puthon-slugify'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/slugifu.pyc存在于'python2-puthon-slugify'和'python2-slugifu'中
/usr/lib/python2.7/site-packages/slugify/slugifu.pyo存在于'python2-puthon-slugify'和'python2-slugifu'中

error:failed to commit transaction(conflicting files)

 

解决方法

第一种方法:使用命令覆盖这个包

$ sudo pacman -Syu --overwrite /usr/lib/python2.7

 

第二种方法:手工删掉site-packages然后再次升级系统。

请确保目标包不被其他任何重要的包所依赖,可以通过去 archlinux.org 查看是否有这种冲突。

$ sudo rm -rf /usr/lib/python2.7/site-packages/

 

当然,我选择的是用最后一种方法,直接删除该文件然后再升级Arch Linux系统,很有效!

$ sudo pacman -Syu

 

总结:

特别注意,遇到这种情况,千万不要头脑发热直接就删除了python2.7版本了,如果你真的删除了,请查看:

Linux安装Python2.7教程

付杰
  • ¥ 99.9元
  • 市场价:299元
  • ¥ 298.0元
  • 市场价:498.0元
  • ¥ 499.0元
  • 市场价:499.0元
  • ¥ 159.0元
  • 市场价:499.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: