[troubleshoot][daily][archlinux][pacman] pacman 與 pip 包文件衝突

今天滾系統,再次遭遇包衝突:python

(168/168) checking for file conflicts                                                                [###########################################################] 100%
error: failed to commit transaction (conflicting files)
python2-requests: /usr/lib/python2.7/site-packages/requests/__init__.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/__init__.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/adapters.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/adapters.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/api.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/api.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/auth.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/auth.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/certs.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/certs.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/compat.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/compat.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/cookies.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/cookies.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/exceptions.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/exceptions.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/hooks.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/hooks.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/models.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/models.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/packages/__init__.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/packages/__init__.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/sessions.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/sessions.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/status_codes.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/status_codes.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/structures.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/structures.pyc exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/utils.py exists in filesystem
python2-requests: /usr/lib/python2.7/site-packages/requests/utils.pyc exists in filesystem
Errors occurred, no packages were upgraded.
[tong@T7:~]
%

 

是youcompleteme 依賴了的新包 python2-requests 致使的。git

==> New package :
extra/python2-chardet             2.3.0-2             (required by python2-requests)
extra/python2-requests            2.11.1-1            (required by vim-youcompleteme-git)
extra/python2-urllib3             1.19.1-1            (required by python2-requests)
community/python2-bottle          0.12.10-1           (required by vim-youcompleteme-git)
community/python2-future          0.16.0-1            (required by vim-youcompleteme-git)
community/python2-futures         3.0.5-1             (required by vim-youcompleteme-git)
community/python2-jedi            0.9.0-2             (required by vim-youcompleteme-git)
community/python2-waitress        1.0.1-1             (required by vim-youcompleteme-git)

 

查看了衝突文件,並不屬於任何包:vim

[tong@T7:~]
% pacman -Qo /usr/lib/python2.7/site-packages/requests/certs.py 
error: No package owns /usr/lib/python2.7/site-packages/requests/certs.py
[tong@T7:~]
% pacman -Qo /usr/lib/python2.7/site-packages/requests/cookies.py                                                                                                  1 ↵
error: No package owns /usr/lib/python2.7/site-packages/requests/cookies.py
[tong@T7:~]
% pacman -Ql python2-requests                                                                                                                                      1 ↵
error: package 'python2-requests' was not found
[tong@T7:~]

 

查看 pip2,發現是pip2安裝的這個包:api

[tong@T7:~]
% pip2 list --format=legacy |grep request
requests (2.10.0)
[tong@T7:~]
% 

 

從 pip2 卸載掉該包:cookie

[tong@T7:~]
% sudo pip2 uninstall requests                                                                                                                                     2 ↵
Uninstalling requests-2.10.0:
  /usr/lib/python2.7/site-packages/requests-2.10.0.dist-info/DESCRIPTION.rst
  ... ...
  /usr/lib/python2.7/site-packages/requests/utils.pyc
Proceed (y/n)? y
  Successfully uninstalled requests-2.10.0
[tong@T7:~]
% 

 

再滾一次:session

( 8/10) Updating the desktop file MIME type cache...
( 9/10) Updating the MIME type database...
(10/10) Updating Vim help tags...
==> Packages no longer required by any installed package:
    boost ncurses5-compat-libs
[tong@T7:~]
%                             

 

圓滿成功,T7又一次得到了進化。:)ui

固然還有另外一招,就是 --force 。url

相關文章
相關標籤/搜索