[troubleshoot][daily][archlinux][pacman] pacman 与 pip 包文件冲突

今天滚系统,再次遭遇包冲突:

(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 导致的。

==> 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)

 

查看了冲突文件,并不属于任何包:

[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安装的这个包:

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

 

从 pip2 卸载掉该包:

[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:~]
% 

 

再滚一次:

( 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又一次获得了进化。:)

当然还有另一招,就是 --force 。

 

posted on 2016-11-21 11:58  toong  阅读(612)  评论(0编辑  收藏  举报