yum does not work after sourcing Policy Server environment variables script

Document ID : KB000116627
Last Modified Date : 01/10/2018
Show Technical Document Details
Question:
I have installed Policy Server R12.8 on RHEL7.2, and I found that I get errors regarding python modules when trying to run yum on the system:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/python2.7/site-packages/pycurl.so: undefined symbol: CRYPTO_num_locks

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, May  3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


I noticed this only happens if I have sourced the ca_ps_env.ksh script before running yum. How can I solve this issue?
Environment:
Policy Server R12.8 on RHEL7
Answer:
When you need to run OS functions instead Policy Server tools and commands, you do not need to source Policy Server environment variables script. This makes the OS functions to use libraries specified in the Policy Server environment variables script.

This is mentioned in the documentation at the following location:
https://docops.ca.com/ca-single-sign-on/12-8/en/installing/install-a-policy-server/install-policy-server-on-unix/prepare-for-the-policy-server-installation/#PrepareforthePolicyServerInstallation-DoNotSourcetheEnvironmentSetupScript

So in order to run yum properly, do not source the ca_ps_env.ksh script.