Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3252

/var/cfengine/bin/python symlink is missing, breaking the yum package module

    XMLWordPrintable

    Details

      Description

      From the mailing list: https://groups.google.com/forum/#!topic/help-cfengine/RozD-uNTv3A

      I installed the new version 3.15 (for example cfengine-community-3.15.0-1.el8.x86_64.rpm under Oracle Linux/RHEL 8; and cfengine-community-3.15.0-1.el7.x86_64.rpm under Opensuse Leap 15.1) but there is a problem when using my package promises.
      The debug-option shows:

      debug: Data read from application pipe: 96 [ error: Couldn't run '/var/cfengine/modules/packages/yum'. (execv: No such file or directory) ]

      The module/script '/var/cfengine/modules/packages/yum' has the following "she-bang" line:
      #!/var/cfengine/bin/python

      But the file or symlink /var/cfengine/bin/python doesn't exist. Which is not a surprise because there is no python interpreter it could link to in the base Oracle Linux/RHEL 8 installation, at least not in the default PATH.
      So my question is how to solve this problem in the cleanest way, especially if python3 shall be used as interpreter already.

      From email:

      during my cfengine-community-3.15.0b1-1.x86_64 version approval process on CentOS Linux release 8.1.1911 (Core), by running the command:
      cf-agent --no-lock

      Received the return with the error below.
      sh: line 0: [: -ge: unary operator expected
      sh: line 0: [: too many arguments

      I did a search and noticed that this error is referring to the expression below contained in the file /var/cfengine/inputs/inventory/redhat.cf - line 22

      expression => returnszero ("python -V 2> & 1 | grep ^ Python | cut -d '' -f 2 | (IFS =. read v1 v2 v3; [$ v1 -ge 3] || [$ v1 -eq 2 -a $ v2 -g 4]) ",
      useshell);

      The first point that caught my attention was that in Centos 8 we do not have Python installed, I did the installation, however the /usr/bin/python was not generated.
      So that the error is no longer displayed I created a Python Symbolic Link to path /usr/bin/python

      I am relaying this information to you as a criterion of knowledge and perhaps a correction in future releases.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel