Arch linux: Pacman falhou ao instalar librairies como o arquivo já existe

0

Eu gostaria de instalar as seguintes bibliotecas:

  • python-sip
  • pyton-psutil

No entanto, recebi os seguintes erros:

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.

Como é possível que esses arquivos já existam e o que posso fazer para resolver esse problema?

Obrigado antecipadamente.

    
por Nakrule 26.10.2018 / 09:17

1 resposta

2

pacman se recusará a sobrescrever os arquivos que não estão rastreando, ou seja, não listados em seu banco de dados local.
Esses arquivos provavelmente foram instalados sem usar pacman , manualmente por você ou por algum programa em seu nome.

Em resumo, se esses arquivos não pertencerem a nenhum pacote - e você souber que não está quebrando nada - provavelmente poderá instalar os novos pacotes usando a opção --overwrite , que permite que pacman ignore as verificações de conflito de arquivos e sobrescrever arquivos conflitantes (consulte man pacman para uma explicação detalhada):

# pacman -S --overwrite <glob> package_name

Note, entretanto, que o ArchWiki avisa sobre o uso de --overwrite (já que é necessário um argumento contendo um glob). Consulte a seção Solução de problemas da página relevante, que atualmente aborda seu caso.

Você pode saber qual pacote possui um arquivo (se houver) consultando o banco de dados pacman :

$ pacman -Qo /path/to/file

Um método para identificar todos arquivos não pertencentes a qualquer pacote é ilustrado em esta página do ArchWiki.

    
por 03.11.2018 / 16:00