0

I've two packages available on CentOS 7 system:

  1. package-6.34-1.el7.i686.rpm (32-bit)
  2. package-6.34-1.el7.x86_64.rpm (64-bit)

I'm looking for a command to fetch the appropriate package full name based on the OS version/architecture (32/64bit).

E.g., when I query from a 64bit OS I should get the latest rpm with full name package-6.34-1.el7.x86_64.rpm, as I need to install package with rpm command:

rpm -i --replacefiles <packagename>.rpm

4
rpm -i package-6.34-1.el7.$(uname -m).rpm

or

yum install package-6.34-1.el7.$(uname -m).rpm

Though yum should automatically infer the release (el7) and architecture if you provide it yum install package and you're looking for the latest version in your configured repositories.

  • You should also have the yum line as well yum install package-6.34-1.el7.$(uname -m).rpm – thebtm Mar 1 '18 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.