パッケージ競合ファイルの更新エラー(上書きが機能しない)

パッケージ競合ファイルの更新エラー(上書きが機能しない)

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/*'

引用符と等号に注意してください!

この時点で私に問題に対する解決策を示したSysGhostのManjaro IRC Chanelに感謝の言葉を伝えたいと思います。

関連情報