0

I'm trying to edit a spec file which always fails when I try to install it on other computer using RPM. I'm using CentOS. Here is the error.

error: Failed dependencies:
perl(ActsUtil) is needed by my_program
perl(ParseBishop) is needed by my_program

Both these 2 files are dependencies for the RPM. The thing is, these 2 files are actually provided inside the RPM package. Both these files are .pm file and located inside /opt/mysoftware/bin. I know it can be solved using rpm - ivh --nodeps mysoftware. But I dont prefer to use that method. So, I tried fixing the spec file. Here are some of the code that I've tried.

1st try

Summary:....
Name:..
Version:..
....
....
Provides: perl(ParseBishop), perl(ActsUtil)
...
...
%install
...
...
%changelog

2nd try

Summary:....
Name:..
Version:..
....
....
Provides: ParseBishop, ActsUtil
...
...
%install
...
...
%changelog

3rd try

Summary:....
Name:..
Version:..
....
....
Provides: ParseBishop.pm, ActsUtil.pm
...
...
%install
...
...
%changelog

4th try

Summary:....
Name:..
Version:..
....
....
Provides: /opt/mysoftware/bin/ParseBishop, /opt/mysoftware/bin/ActsUtil
...
...
%install
...
...
%changelog

Am I doing the "Provides" command wrong? Or my approach in solving the issue is already wrong? All guide and help are really appreciated.

Mohd Fikrie
  • 197
  • 4
  • 21

1 Answers1

1

I have found the solution. The problem was my Provides are in the wrong area. It is suppose to be at the top of the code.

Summary:...
Name:...
Version:...
Provides: perl(ParseBishop), perl(ActsUtil)
...
...
%install
...
...
%changelog

To verify this. I have used rpm -qp --provides mysoftware.rpm inside the built folder. It will display what are provided from my packages.Thanks for all the help.

Mohd Fikrie
  • 197
  • 4
  • 21