Cannot execute scl command remotely.

Latest response

When executing scl command remote from other server cause error.
Example
ssh user1@server1.com scl enable rh-python36 'python /home/user1/setup.py install --user'
cause error : Unable to open /etc/scl/conf/python!

Responses

Ensure software collections repository is enabled. There's a typo in your example, rh-pyhton36 should be rh-python36.

See guidance on Python 3.6 software collection

Hi Sam Wachira. Sorry, I have a mistake in type this post. But when execute the command on the server, I used the right one. Anyway, software collection is enabled on my server. This problem occurs only when I execute the command remotely using ssh from another server.

Last, I found what is the right to deal with this problem. The problem is using wrong options for scl command. I haven't any document that indicates this problem. So I have been trying to change the parameter option in the scl command and last I found it. by creating a shell script that call setup.py.

cd /path/to/script/; python ./setup.py

and from Jenkins call this using scl command :

sh user1@server1.com scl enable  'rh-python36 /path/to/script/setup_script.sh'

package name rh-pythong36 must be put as string along with path to the shell script.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.