6

I'm having trouble trying to install screen on Red Hat Enterprise Linux Client release 7.2.

I have tried:

sudo yum install screen

Also...

sudo yum install screen.x86_64

Running...

sudo yum list screen

yields...

Error: No matching Packages to list

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Desktop
Product ID:     68
Version:        7.5
Arch:           x86_64
Status:         Subscribed
Status Details:
Starts:         04/24/2018
Ends:           04/24/2019

Running sudo yum repolist gave me this:

repo id repo name status

elasticsearch-2.x  Elasticsearch repository for 2.x packages - 22

epel/x86_64  Extra Packages for Enterprise Linux 7 - x86_64 - 12585

google-chrome  google-chrome - 3 

kibana-4.4  Kibana repository for 4.4 x packages - 5

logstash-2.2  logstash repository for 2.2 packages - 5

rhel-7-desktop-rpms/7Client/x86_64 Red Hat Enterprise Linux 7 Desktop (RPMs) - 16420

repolist: 29,040

I'm definitely a newer linux user so I apologize if this is a simple fix, but I'm struggling to find an answer via google.

5 Answers 5

2

The command to install screen is definitely yum -y install screen.

Since yum is reporting that the package isn't found, your issue is either the metadata on your client is messed up, or the repository on the server is messed up. The situation is likely a client side issue. The following commands should help clean up your client of any simple issues:

service rhsmcertd restart
subscription-manager refresh
yum clean all && yum rm -rf /var/cache/yum && yum makecache

Also, make sure that your repositories are being managed by subscription-manager. The config file /etc/rhsm/rhsm.conf needs to have the following value set manage_repos = 1. If your repos were previously unmanaged, make the change and perform the previous steps.

If the issue is on the server, and you do not have access to the repositories, then you're out of luck by installing it through these methods. However you can always download the RPM manually, and install the file locally

yum -y localinstall ~/Downloads/screen

EDIT: For some reason or another, your configured repositories are not working correctly. I have a rhel-6-workstation-rpm subscription, and that is where the screen package is located. I see that you have a rhel-7-desktop-rpm subscription, which is the repository I would expect the rpm to be in.

Run the following command to see if you have any disabled repositories:

egrep -Hi '(^\[|^enabled)' /etc/yum.repos.d/*

If there is a repository that is disabled that looks important, modify the config file, and change the repository to enabled

You can also look for any available subscriptions that should be attached to your machine:

subscription-manager list --all

This output will be rather long, so look through this carefully.

1
  • Thanks for response. I'm attempting to be able to do this without installing locally since my goal is to use Ansible to automate this process. I was able to do all the commands successfully, but no luck. I'm not sure if maybe I'm missing the repository, but everything I can find uses yum. I can't seem to find documentation for installing screen on RHEL 7, but I just keep getting "No package screen available". I made sure rhsm.conf was properly configured. Any more suggestions would be great!
    – Stimulai
    Commented Jun 12, 2018 at 18:43
2

I'm posting this as a new answer, because I'm highly confident this is the correct 'solution' to your problem.

Unfortunately, if you look up the package on Redhats package search (RedHat account required)

You will see that the 'screen' package is NOT available in the 'rhel-7-desktop-rpms' repository. This package is only available in the following repositories:

  • rhel-7-server-rpms
  • rhel-7-server-eus-rpms
  • rhel-7-workstation-rpms

Essentially, you do not have the correct subscription that contains the screen package.

This seems absurd, considering screen is an incredibly important package, and is often a requirement to be installed on all machines.

These distinctions should be more obvious when chosing between a Desktop, versus a Workstation subscription because they are not intuitive. I have been bit by this issue before, and is one of my biggest gripes with RedHat.

1
  • This makes a lot of sense and explains why I couldn't find anything about it on RHEL7. I appreciate that link as well, that'll be helpful in the future.
    – Stimulai
    Commented Jun 13, 2018 at 20:14
2

RedHat removed "screen", they recommend and officially maintain "tmux" as an alternative. Details and reasons can be found here

If you still want to use "screen" you can install the community maintained version via EPEL

After you've added the epel repo a "yum install screen" works

1

Install it from the source code.

Get the source code. Current latest downloadable version is 4.8.0 (Under Linux from Scratch 9.1)

wget https://ftp.gnu.org/gnu/screen/screen-4.8.0.tar.gz

Uncompress and configure:

tar xzf screen-4.8.0.tar.gz 
cd screen-4.8.0/

Install the ncurses library:

yum install ncurses-devel

Run the listed commands, which are copied from Linux from Scratch: Screen.

Configure setup (one multi-line command):

./configure --prefix=/usr                     \
            --infodir=/usr/share/info         \
            --mandir=/usr/share/man           \
            --with-socket-dir=/run/screen     \
            --with-pty-group=5                \
            --with-sys-screenrc=/etc/screenrc &&
sed -i -e "s%/usr/local/etc/screenrc%/etc/screenrc%" {etc,doc}/* &&
make

Make and install (another multi-line command):

make install &&
install -m 644 etc/etcscreenrc /etc/screenrc
0

screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm is on the RHEL 7.6 install dvd.

I don't have RHEL-7.2 specifically at the moment to truly know, but for screen I'm sure it is there on that install dvd to. The other possibility is using a desktop/workstation version of redhat rather than server then maybe the screen package wasn't available (but I doubt it).

  • you definitely want to do a yum install screen
  • yum will search all active repositories as specified under /etc/yum.repos.d/
  • Even if the RHEL dvd is installed, oftentimes there is not an active repository pointing to the dvd drive for yum to reference.
  • If screen has no dependencies, which you will find out, you can simply do
    • mkdir /mydvd
    • mount -o loop rhel-server-7.6-x86_64-dvd.iso /mydvd
    • cp /mydvd/Packages/screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm .
    • yum install ./screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm

The option which I prefer the most, is to copy all the rpm's from the install dvd Packages folder to some folder such as /root/repoDVD. Then you simply have a local repository, which is the install dvd, where you don't need the dvd. Simply do createrepo /root/repoDVD and create the corresponding file within /etc/yum.repos.d.

# local repository

# name this file /etc/yum.repos.d/<anything>.repo

[dvd]
name = Local Copy of Install DVD
baseurl=file:///root/repoDVD
enabled=1
gpgcheck=0   # change this if desired, no reason not to the gpgkey is on the dvd

This way having a local repository for yum to reference, which is the entire contents of the install dvd, it will resolve any dependencies the proper way if they arise.

You must log in to answer this question.

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