containers / udica

This repository contains a tool for generating SELinux security profiles for containers
GNU General Public License v3.0
488 stars 47 forks source link

missing /usr/local/lib/python3.6/site-packages directory #9

Closed milosmalik closed 2 years ago

milosmalik commented 5 years ago

Describe the bug First run of setup.py leads to:

python3 ./setup.py install

running install error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the installation directory:

[Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/test-easy-install-7253.write-test'

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/usr/local/lib/python3.6/site-packages/

This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option).

Expected behavior The documentation should recommend to create the directory, because it may not exist.

milosmalik commented 5 years ago

Following command solves the problem: mkdir -p /usr/local/lib/python3.6/site-packages

It may not be obvious from the documentation that some udica files are installed under /usr/share/udica and some are installed under /usr/local/lib. One location only would be great.

milosmalik commented 5 years ago

tested on RHEL-8.0

JAORMX commented 5 years ago

@milosmalik I'm having similar issues with both RHEL 8.0 and the UBI (Unified Based Image). Is there another workaround other than the creation of that directory? Seems to me like it's be something that should be fixed in the distro. Have you reported it there?

clarabez commented 4 years ago

I just created again my site packages folder and it worked fine on MacOS: mkdir site-packages

wrabcak commented 4 years ago

@milosmalik , Could you please take a look on comment by @JAORMX ?

Thanks, Lukas.

milosmalik commented 4 years ago

@milosmalik I'm having similar issues with both RHEL 8.0 and the UBI (Unified Based Image). Is there another workaround other than the creation of that directory? Seems to me like it's be something that should be fixed in the distro. Have you reported it there?

I'm sorry for the late reply. No, I didn't report it because the problem did not appear on RHEL-8.1 (I used the udica package which is shipped with the distribution).

ashcrow commented 4 years ago

Just did an install by building the container to verify and using setup.py does install to /usr/local/lib by default when installing directly on the system.

vmojzis commented 3 years ago

Looks like a bug in setuptools that has been addressed by this PR: https://src.fedoraproject.org/rpms/python-setuptools/pull-request/5

vmojzis commented 2 years ago

Closing since this should be fixed now (by setuptools).