编写yum脚本以安装包列表

时间:2016-03-15 22:53:14

标签: bash shell scripting yum

我无法让yum使用我想要安装的软件包列表。我试过了:
    yum -y install $(cat /home/pkglist.txt)

    for i in cat pkglist.txt; do yum -y install $i; done

    yum -y install $(cat pkglist.txt | tr '\n' ' ' | tr '\r' ' ')
但他们都没有安装包裹 我得到的全部是:
     Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Install Process available.perl-CPAN available.cpp available.fontconfig available.gcc available.gd available.net-snmp-libs available.mailcap available.perl-libwww-perl available.perl-XML-LibXML available.perl-DateTime available.perl-Time-HiRes available.make available.net-snmp-perl available.perl-Test-Pod available.perl-Net-SSLeay available.expat-devel available.expat Error: Nothing to do

提前致谢! -Luke

1 个答案:

答案 0 :(得分:0)

你可以 -

cat /home/pkglist.txt | xargs yum -y install