You are not logged in.

#1 2020-11-17 08:54:00

bunnybooboo
Member
Registered: 2017-12-11
Posts: 15

[Solved] OpenSSL conflicting files

Hi folks!

Difficult update out of the blue recently and hope I can get insight on how to resolve.

When performing

pacman -Syu

the OpenSSL suite borks progress.

(82/82) checking for file conflicts                [######################] 100%
error: failed to commit transaction (conflicting files)
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/SSL.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/SSL.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/__init__.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/__init__.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/_util.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/_util.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/crypto.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/crypto.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/debug.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/debug.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/rand.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/rand.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/tsafe.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/tsafe.pyc exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/version.py exists in filesystem
python2-pyopenssl: /usr/lib/python2.7/site-packages/OpenSSL/version.pyc exists in filesystem
Errors occurred, no packages were upgraded.

If I then try both

sudo pacman -Rsun python2-pyopenssl

and (just in case)

pip uninstall openssl

terminal prints that it can't be found/not installed. This leaves me stuck without the ability to proceed. Any ideas? Thanks for reading.

Last edited by bunnybooboo (2020-11-17 10:42:20)

Offline

#2 2020-11-17 09:24:08

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: [Solved] OpenSSL conflicting files

It seems you have used pip as root.

Manually remove each of the conflicting files, first determining if they are not needed by anything.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2020-11-17 09:26:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,424

Re: [Solved] OpenSSL conflicting files

As we are talking python2 you will want to rerun that uninstall command with pip2

Offline

#4 2020-11-17 10:33:23

bunnybooboo
Member
Registered: 2017-12-11
Posts: 15

Re: [Solved] OpenSSL conflicting files

V1del wrote:

As we are talking python2 you will want to rerun that uninstall command with pip2

Thanks for the suggestion. Nope, still shows as not installed.

Offline

#5 2020-11-17 10:35:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,424

Re: [Solved] OpenSSL conflicting files

If you don't know where it came from, follow the general approach mentioned by mpan: https://wiki.archlinux.org/index.php/Pa … )%22_error

Offline

#6 2020-11-17 10:41:17

bunnybooboo
Member
Registered: 2017-12-11
Posts: 15

Re: [Solved] OpenSSL conflicting files

mpan wrote:

It seems you have used pip as root.

Manually remove each of the conflicting files, first determining if they are not needed by anything.

Hey many thanks, really appreciate the help while my brain went into a fuzz!

Via the other suggestion here, even running a

sudo pip2 uninstall openssl

did not locate it. Assuming an orphaned package (despite regular efforts to avoid such a scenario) and deprecation of Python 2 in January.. I ran

sudo rm -rf /usr/lib/python2.7/site-packages/OpenSSL

pacman now completes with python2-pyopenssl update rectified.

Offline

#7 2020-11-17 10:54:05

bunnybooboo
Member
Registered: 2017-12-11
Posts: 15

Re: [Solved] OpenSSL conflicting files

V1del wrote:

If you don't know where it came from, follow the general approach mentioned by mpan: https://wiki.archlinux.org/index.php/Pa … )%22_error

Oof.. this is likely the method I SHOULD HAVE safely proceeded with. I've not been utilising most of the PIP installed packages. Primarily legacy from assisting open source projects that I've sadly not had time free to continue. This is why I'm unlikely to observe any breakages in my day to day use.. I'd not recommend my choice of a fix for most users.

Anyone reading this later should head to this recommended method instead, wink

Offline

#8 2020-11-17 12:35:27

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: [Solved] OpenSSL conflicting files

Deeply buried, but:

When installing packages from sources other than the official repositories and AUR, it is recommended to use a virtual environment (or Conda environment management) to prevent conflicts with system packages in /usr. Alternatively, pip install --user can be used to install packages into the user scheme instead of /usr. — Arch Linux Wiki on Pip → Package management

That applies to any other software that tries to perform system-wide modifications.

A very rough guide: this is my opinion on where system-wide changes are safe depending on what makes them. tl;dr “/usr” (other than “/usr/local”) should be considered a sacred place touchable only by pacman. The opinion is not neccesserily shared by other members of the community:

                         | pacman |  you  | other tools
-------------------------+--------+-------+-------------
 /usr, except /usr/local |   ✓    |   ✗   |   ✗
 /usr/local              |   ?    |   ✓   |   ✓
 /home/*                 |   ✗    |   ✓   |   ✗
 /opt                    |   ✓    |   ?   |   ?
 /etc                    |   ✓    | conf¹ | conf¹
 /var                    |   ✓    |   ✓¹  |   ✓¹
 /srv                    |   ✓    |   ✓²  |   ✓²
-------------------------+--------+-------+-------------

 v    — should not cause issues.
 x    — is likely to lead to conflicts.
 conf — changing/adding config files shsould not cause
        problems, but other modifications may.
 ?    — May be acceptable, if you are aware of what you
        are doing and apply some consistent policies.
 ¹    — prefreably make changes only inside directories
        owned by pacman packages.
 ²    — pay extra attention to keep things neatly arranged.

Some convincing stats from the official core/extra/community repos: 97% packages use “/usr”, 10% use “/etc”, 2% use “/var”, 0.7% use “/opt”, <0.1% use “/srv”, 0% use “/usr/local” (and 0% should).

--- edit: so far at least one person gave opinion that “/usr/share” should never be touched by pacman.

Last edited by mpan (2020-11-17 13:54:56)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB