Archlinux 滚动升级失败的解决办法

2/13/2017来源:经验技巧人气:1784

当我使用sudo pacman -Syu进行滚动升级时,显示错误如下:

error: failed to commit transaction (conflicting files) python2-setuptools: /usr/lib/python2.7/site-packages/pkg_resources/__init__.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/__init__.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/archive_util.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/__init__.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/build_py.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/easy_install.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_lib.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/py36compat.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/sdist.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/setopt.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/depends.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/dist.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/extension.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/glob.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/monkey.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/msvc.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/namespaces.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/package_index.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py26compat.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py27compat.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py31compat.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/sandbox.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/ssl_support.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/unicode_utils.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/version.pyc exists in filesystem python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/windows_support.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/appdirs.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/appdirs.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/distro.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/distro.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_ihatexml.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_ihatexml.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_inputstream.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_inputstream.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_tokenizer.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_tokenizer.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/__init__.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/__init__.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/_base.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/_base.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/datrie.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/datrie.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/py.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/py.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/base.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/base.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/base.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/base.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshi.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshi.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/ordereddict.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/ordereddict.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/labels.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/labels.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/mklabels.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/mklabels.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/x_user_defined.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/_vendor/webencodings/x_user_defined.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/commands/check.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/commands/check.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/Operations/check.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/operations/check.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/utils/glibc.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/utils/glibc.pyc exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/utils/packaging.py exists in filesystem python2-pip: /usr/lib/python2.7/site-packages/pip/utils/packaging.pyc exists in filesystem Errors occurred, no packages were upgraded.

解决方案是:

sudo pacman -S python2-setuptools --force sudo pacman -S python2-pip --force

这样之后就好了