Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-26646

yum/dnf commands search for /usr/local python modules

    • dnf-4.20.0-1.el10
    • None
    • Moderate
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 15
    • 20
    • 5
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Release Note Not Required
    • x86_64
    • None

      What were you trying to do that didn't work?

      Executing yum/dnf commands with python libraries in `/usr/local` path.

      Please provide the package NVR for which bug is seen:

      dnf-4.7.0-19.el8.noarch

      How reproducible:

      Always

      Steps to reproduce

      Executing  dnf commands (dnf repolist) looks for files in '/usr/local'. 

      ~~~
      $ strace -fttTvyy -s 128 -o dnf.strace – dnf repolist

      $ grep "/usr/local/lib" dnf.strace 
      3722  17:48:59.253706 stat("/usr/local/lib64/python3.6/site-packages", 0x7ffd1f5ff800) = -1 ENOENT (No such file or directory) <0.000003>
      3722  17:48:59.253718 stat("/usr/local/lib/python3.6/site-packages", 0x7ffd1f5ff800) = -1 ENOENT (No such file or directory) <0.000002>
      ~~~

      This eventually leads to fail yum/dnf commands when '/usr/local' has custom or problematic python3.6 libraries interfering.  For example errors like below for 'yum' : 

      ~~~
      Traceback (most recent call last):
      File "/usr/bin/yum", line 57, in <module>
      from dnf.cli import main
      ImportError: No module named dnf.cli
      ~~~

      Expected results

      The dnf/yum should not refer to '/usr/local' 

      Actual results

      The dnf/yum commands refers to '/usr/local'

              rhn-support-ppisar Petr Pisar
              rhn-support-ppaddhar Paras Paddhariya
              packaging-team-maint packaging-team-maint
              Eva Mrakova Eva Mrakova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: