4

I'm trying to automate a reinstallation of a Centos box with a script, and everything is working well except that when scl is executed, the script terminates.

I use it to change the default g++ compiler to 8.

scl enable devtoolset-8 bash

How can I run scl without exiting my script?

0

1 Answer 1

2

For RHEL, use:

source /opt/rh/devtoolset-8/enable

The script enable simply sets environment variables like PATH, MANPATH, LD_LIBRARY_PATH, etc. so that the devtoolset-8 tools are used instead of those that are installed to default paths. It is functionally similar to scl enable but it will not terminate your script.

1
  • 3
    Can you say a little about how to use this and how/why it works? Please do not respond in comments; edit your answer to make it clearer and more complete. Commented Apr 8, 2020 at 3:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .