[英]How can I make Python3.6, Red Hat Software Collection, persist after a reboot/logout/login?
I am trying to enable rh-python36 software collection after reboot So I can avoid calling "scl enable" all the time. 我试图在重新启动后启用rh-python36软件收集,所以我可以避免一直调用“ scl enable”。
After unzipping and installing the package: 解压缩并安装软件包后:
yum install -y tmp/rpms/*
I created a new file "python36.sh" under /etc/profile.d with the following script: 我使用以下脚本在/etc/profile.d下创建了一个新文件“ python36.sh”:
#!/bin/bash
source /opt/rh/rh-python36/enable
export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"
After restarting or rebooting the instance, I am getting : No such file or directoryenable
重新启动或重新启动实例后,我得到
: No such file or directoryenable
I am using CentOS release 6.10 (Final) 我正在使用CentOS版本6.10(最终版)
Try this: 尝试这个:
#!/bin/bash
source scl_source enable rh-python36
Reference Doc: https://access.redhat.com/solutions/527703 参考文档: https : //access.redhat.com/solutions/527703
如果您具有root特权,则将下面的代码行添加到根目录中的.bash_profile文件中:
source /opt/rh/rh-python36/enable
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.