Arch Linux:ファイルがすでに存在するため、Pacmanからライブラリをインストールできません。

Arch Linux:ファイルがすでに存在するため、Pacmanからライブラリをインストールできません。

次のライブラリをインストールしたいと思います。

  • Python-sip
  • パイトン-psutil

ただし、次のエラーが発生します。

nakrule@mordor ~ % pacman -S python-psutil 
[sudo] password for nakrule: 
Sorry, try again.
[sudo] password for nakrule: 
resolving dependencies...
looking for conflicting packages...

Packages (1) python-psutil-5.4.7-1

Total Installed Size:  1.95 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                [----------------------------------] 100%
(1/1) checking package integrity                              [----------------------------------] 100%
(1/1) loading package files                                   [----------------------------------] 100%
(1/1) checking for file conflicts                             [----------------------------------] 100%
error: failed to commit transaction (conflicting files)
python-psutil: /usr/lib/python3.7/site-packages/psutil-5.4.7-py3.7.egg-info/PKG-INFO exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil-5.4.7-py3.7.egg-info/SOURCES.txt exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil-5.4.7-py3.7.egg-info/dependency_links.txt exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil-5.4.7-py3.7.egg-info/not-zip-safe exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil-5.4.7-py3.7.egg-info/top_level.txt exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__init__.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_common.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_compat.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_exceptions.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_psaix.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_psbsd.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_pslinux.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_psosx.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_psposix.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_pssunos.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/__pycache__/_pswindows.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_common.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_compat.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_exceptions.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psaix.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psbsd.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_pslinux.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psosx.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psposix.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_pssunos.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-x86_64-linux-gnu.so exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_psutil_posix.cpython-37m-x86_64-linux-gnu.so exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/_pswindows.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__init__.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__main__.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/__main__.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_aix.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_bsd.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_connections.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_contracts.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_linux.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_memory_leaks.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_misc.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_osx.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_posix.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_process.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_sunos.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_system.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_unicode.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/__pycache__/test_windows.cpython-37.pyc exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_aix.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_bsd.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_connections.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_contracts.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_linux.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_memory_leaks.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_misc.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_osx.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_posix.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_process.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_sunos.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_system.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_unicode.py exists in filesystem
python-psutil: /usr/lib/python3.7/site-packages/psutil/tests/test_windows.py exists in filesystem
Errors occurred, no packages were upgraded.
1 nakrule@mordor ~ % pacman -S python-sip                                                           :(
resolving dependencies...
looking for conflicting packages...

Packages (1) python-sip-4.19.13-1

Total Installed Size:  0.24 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                [----------------------------------] 100%
(1/1) checking package integrity                              [----------------------------------] 100%
(1/1) loading package files                                   [----------------------------------] 100%
(1/1) checking for file conflicts                             [----------------------------------] 100%
error: failed to commit transaction (conflicting files)
python-sip: /usr/lib/python3.7/site-packages/sip.so exists in filesystem
Errors occurred, no packages were upgraded.

これらのファイルがすでに存在できる理由は何ですか。この問題を解決するにはどうすればよいですか。

よろしくお願いします。

答え1

pacman追跡しないファイル、つまりローカルデータベースにリストされていないファイルの上書きを拒否します。これらのファイルは、手動でインストールしたり、代わりにプログラムを使用したりすることなく
インストールできます。pacman

簡単に言えば、ファイルがどのパッケージにも属さず、何も破損していない場合は、ファイルの競合チェックをバイパスし、競合するファイルを上書きする--overwriteオプションを使用して新しいパッケージをインストールできます(詳細説明を参照)。pacmanman pacman

# pacman -S --overwrite <glob> package_name

しかし、ArchWikiに注意してください。使用しないでください警告 --overwrite(globを含むパラメータが必要なためです。)トラブルシューティング現在あなたの出来事を扱っている関連ページセクションです。

pacmanデータベースを照会して、実際にファイルを所有しているパッケージ(存在する場合)を知ることができます。

$ pacman -Qo /path/to/file

識別方法みんなどのパッケージにも属さないファイルは、図に表示されます。このページアーチウィキ。

関連情報