0

I have my locally generated rpm packages (the main package and its dependencies) located in my home directory. The spec file defines dependencies. I'd like to install it with a single yum or dnf command and let it find dependencies in my directory and install them accordingly. I tried yum:

% yum -y localinstall ~/rpms/mypackage-2.1.1-2.1.x86_64.rpm

However it complains:

Error:
 Problem: conflicting requests
  - nothing provides mypackage-libs(x86-64) = 2.1.1-2.1 needed by mypackage-2.1.1-2.1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Am I doing something wrong, or this indicates that I have a bug in my spec file?

Mark
  • 249
  • 1
  • 5
  • 13

1 Answers1

1

yum's error is consistent with mypackage requiring sub-package mypackage-libs (of the exact same version). This is a pattern that can work for packages.

However you need to install libs first, or both at the same time. For loose rpms, provide both files. As the file names would be by convention very similar, a shell trick useful here is brace expansion:

yum localinstall ~/rpms/mypackage{,-libs}-2.1.1-2.1.x86_64.rpm

I'd like to install it with a single yum or dnf command and let it find dependencies in my directory and install them accordingly.

yum requires a repo to use a directory (or remote server) of packages in dependency solving. Which will enable just yum install mypackage Consider creating a custom mirror, with createrepo (aka createrepo_c) or a higher level software content management solution.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • Thanks for comments! Let me clarify that I understand it right: a) create my custom repository for `mypackage` b) update `/etc/yum.repos.d` to add my new repository Does that sound right? – Mark Jun 13 '22 at 13:24