Unable to activate rhel-server-rhscl-7-rpms on RHEL7

Jonathan asked:

I am trying to install PHP7.1 on my RHEL7 server and I am unable to get the repository where it exists to attach.

From various redhat support articles I have been following don’t seem to do the trick.

[root@nj-way-intranet:~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[root@nj-way-intranet:~]# subscription-manager repos --enable rhel-server-rhscl-7-beta-rpms
Error: 'rhel-server-rhscl-7-beta-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
[root@nj-way-intranet:~]# subscription-manager repos --list | egrep rhscl
[root@nj-way-intranet:~]# subscription-manager repos --enable rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.
[root@nj-way-intranet:~]# subscription-manager repos --enable rhel-7-server-optional-rpms
Repository 'rhel-7-server-optional-rpms' is enabled for this system.
[root@nj-way-intranet:~]# subscription-manager repos --enable rhel-server-    rhscl-7-rpms
Error: 'rhel-server-rhscl-7-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.

[root@nj-way-intranet:~]# subscription-manager list

+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.4
Arch:           x86_64
Status:         Subscribed
Status Details:
Starts:         12/20/2017
Ends:           12/19/2018

Any help is greatly appreciated.

I added a pastebin with the output of the repos I have as it is pretty extensive:

https://pastebin.com/AxkSvi9f

added pastebin of repo list

My answer:


The correct name of the repo is rhel-server-rhscl-7-rpms. You seem to have some sort of nonprinting or whitespace character embedded in the middle of your command line. Try copying and pasting.

Repo ID:   rhel-server-rhscl-7-rpms
Repo Name: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/rhscl/1/os
Enabled:   0

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.