Solved

Yum install from text file not working

Posted on 2014-11-12
9
257 Views
Last Modified: 2014-12-02
RHEL 6.3 - No RHN subscription.   I am trying to install packages from a local repo created from the mounted DVD.  

# yum repolist shows the repo listed correctly

I have a text file with a list of the packages I need to install.  I ran the following command to install each of the listed packages:

yum -y install $(cat yumtest.txt)

All the packages show as "available", but nothing actually installs (See screenshot).  I was able to get this to work successfully once in the past, but can't figure out why it no longer works.  The result from the command is "Nothing to do"

If I try and run yum once for each package manually, the packages install correctly.

Any ideas would be appreciated.

Thanks!
yumtest.txt
yum.jpg
0
Comment
Question by:CipherUser
9 Comments
 
LVL 61

Expert Comment

by:gheist
ID: 40438613
That is illegal according to redhat.
Legal is to configure CentOS or Oracle public-yum repos and convert to free system
0
 

Author Comment

by:CipherUser
ID: 40438635
Updating packages off of the RHEL install DVD using yum is illegal?  I'm not trying to get updates.  I'm just trying to add some packages that didn't get installed during the initial GUI installation.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40438683
Redhat licence mentions it is to be used only with valid subscription.
CentOS and Oracle Linux does not have such ripoffs hidden between lines.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40438778
Since you are installing Oracle DBMS requirements I see no sane reason of not using Oracle Linux 6.6
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:CipherUser
ID: 40438831
I'm aware that there are other variants/flavors of Linux that would make this a non-issue, but using RHEL is the only option in this test/dev scenario.   Does anyone have an answer to my original question about why using YUM to install from a text file isn't working?

gheist - I appreciate your feedback, but it's not addressing my question.  Can you suggest an easy way to install multiple packages from the original DVD after the original installation has been completed, preferably from the CLI?

Thanks!
0
 
LVL 27

Accepted Solution

by:
serialband earned 500 total points
ID: 40438852
http://fritshoogland.wordpress.com/2012/05/26/using-your-dvd-as-a-yum-repository-on-a-rpm-based-linux/

To get yum use the DVD as a repository, add a file ‘rhel-dvd.repo’ in /etc/yum.repos.d with the following content:

[dvd]
name=Red Hat Enterprise Linux Installation DVD
baseurl=file:///media/Server
enabled=0

The added repository is named ‘dvd’, and is disabled. In order to use this repository, add ‘–enablerepo=dvd’ to use it. This way it doesn’t interfere with anything, like someone adding a web-based (“real”) repository.
Using the repository

Now you can add packages, which dependencies are resolved by yum using:

# yum install --enablerepo=dvd packagename
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 40438872
try this:

cat yumtest.txt | while read mypkg
do
    yum -y install $mypkg
done
0
 
LVL 61

Expert Comment

by:gheist
ID: 40439249
So pay up your  policy. No Idea why you dont want developer subscription, but instead choose to misappropriate copyrighted software.
RHEL Developer subscription costs 99$/year, EUS 300$/year AUS 500$/year
And you need latest because of your love of old versions.
0
 

Author Closing Comment

by:CipherUser
ID: 40476803
The solution, though helpful, never addressed my original question.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now