Run Multiple rpm files

Latest response

How can I manually install multiple rpm files on a standalone server? When I try to manually install multiple RHEL 6.8 rpm files using the rpm -ivh *.rpm command. The output is unable to execute /bin/rpm: Argument list too long. Is there a command that will let me run all the files or run them in batches?

Responses

try

yum install /path/to/*.rpms

Hi Hani,

A little modification ... the command is : sudo yum localinstall <path-to-the-rpm-files-location>/*.rpm

Cheers :)
Christian

Hi Christian,

Yes, you are right, but I found that both are working with me.

Regards Hani

Yes, error "too many arguments" is because of kernel limitation which can't be changed unless re-complied, check out this KB https://access.redhat.com/solutions/21118. So, you may need to use "xargs" to parse a large list of packages and then it would work. (ls /tmp/packages|xargs rpm -ivh * == this would pull out all packages stored in /tmp/packages folder and install if dependencies are satisfied.)

Otherwise, as suggested here, you would need to use "yum" which is the frontend for "rpm" to get the task done.

The argument list size is actually fairly large. While entirely agreeing with the "yum install ..." and "ls | xargs yum install" ploys, I wonder if you have a giant pool of every RPM every released since 6.8, including 3-10 versions of some of them. If you had a fresh set or purged the old ones you might not run into the limit in the first place.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.