如何使Python3.6,redhat软件集合,在重新启动/注销/登录后保持不变?

2024-04-20 07:29:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在重新启动后启用rh-python36软件集合,这样就可以避免一直调用“scl enable”。
解压缩并安装软件包后:

yum install -y tmp/rpms/*

我用以下脚本在/etc/profile.d下创建了一个新文件“python36.sh”:

#!/bin/bash
source /opt/rh/rh-python36/enable
export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"

重新启动或重新启动实例后,我将得到: No such file or directoryenable
我正在使用CentOS 6.10版(最终版)


Tags: install文件脚本软件enableshetcprofile
2条回答

试试这个:

#!/bin/bash
source scl_source enable rh-python36

参考文件:https://access.redhat.com/solutions/527703

如果您具有root权限,请将下面的代码行添加到根目录中的.bash_配置文件中:

source /opt/rh/rh-python36/enable

相关问题 更多 >