yay -Syu
如果我尝试使用或更新我的软件包,我会收到错误sudo pacman -Syu
(270/270) checking for file conflicts [############################################################################] 100%
error: failed to commit transaction (conflicting files)
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/cli/__pycache__/main.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/cli/main.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/collector.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/collector.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/package_finder.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/__pycache__/scheme.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/scheme.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/__pycache__/download.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/__pycache__/utils.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/download.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/utils.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/metadata.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/metadata_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/wheel_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/editable_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/distutils_args.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/pkg_resources.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/distutils_args.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/pkg_resources.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py exists in filesystem
Errors occurred, no packages were upgraded.
我还尝试覆盖选项,因为许多来源都推荐它:
sudo pacman -S python-pip --overwrite /usr/lib/python3.8/site-packages/pip/_internal/*
甚至有:
sudo pacman -S python-pip --overwrite *
但随后我收到以下错误消息:
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/cache.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/cache.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/cli
warning: '/usr/lib/python3.8/site-packages/pip/_internal/cli' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/commands
warning: '/usr/lib/python3.8/site-packages/pip/_internal/commands' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/configuration.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/configuration.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/distributions
warning: '/usr/lib/python3.8/site-packages/pip/_internal/distributions' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/exceptions.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/exceptions.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/index
warning: '/usr/lib/python3.8/site-packages/pip/_internal/index' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/__init__.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/__init__.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/locations.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/locations.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/main.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/main.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/models
warning: '/usr/lib/python3.8/site-packages/pip/_internal/models' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/network
warning: '/usr/lib/python3.8/site-packages/pip/_internal/network' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/operations
warning: '/usr/lib/python3.8/site-packages/pip/_internal/operations' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/pep425tags.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/pep425tags.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/__pycache__
warning: '/usr/lib/python3.8/site-packages/pip/_internal/__pycache__' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/pyproject.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/pyproject.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/req
warning: '/usr/lib/python3.8/site-packages/pip/_internal/req' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/utils
warning: '/usr/lib/python3.8/site-packages/pip/_internal/utils' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/vcs
warning: '/usr/lib/python3.8/site-packages/pip/_internal/vcs' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
有人可以向我解释一下如何解决这个问题吗?我唯一知道的是,我曾经启动过一次更新,但由于我的笔记本电脑电池电量不足而被突然取消。
答案1
在我发现的所有来源中,覆盖命令都是错误的。你必须这样写:
sudo pacman -S python-pip --overwrite='/usr/lib/python3.8/site-packages/*'
请注意引号和等号!
在这一点上,我要感谢 Manjaro IRC Chanel 的 SysGhost,他向我展示了问题的解决方案。