문제

I am building rpm package for internal software. It contains binaries and perl script/modules. During build process rpmbuild automatically scans perl code and builds dependency perl modules including DBD:mysql. When I try to install the software package rpm fails with error that it cannot find DBD::mysql. DBD::mysql is installed on the system.

# rpm -ivh conserver-admin-8.1.18-.el5.CME_1.0.x86_64.rpm
error: Failed dependencies:
    perl(DBD::mysql) is needed by conserver-admin-8.1.18-.el5.CME_1.0.x86_64

# rpm -qp --requires conserver-admin-8.1.18-.el5.CME_1.0.x86_64.rpm
/bin/ksh  
/bin/sh  
/usr/bin/perl  
perl(CMEconserver)  
perl(DBD::mysql)  
perl(DBI)  
perl(Data::Dumper)  
perl(Exporter)  
perl(FindBin)  
perl(Getopt::Std)  
perl(POSIX)  
perl(Socket)  
perl(lib)  
perl(strict)  
perl(warnings)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1`

The perl module is installed on the system

# perl -e 'use DBD::mysql;'
#

All of the perl modules in the dependency list are installed on the system and I can run the script without any problem.

What am I doing wrong?

도움이 되었습니까?

해결책

I figured out the problem. rpm will only know about the package that was installed using rpm. I had downloaded the DBD::mysql source and manually compiled and installed it on my system.

I added

AutoReq: no

to my spec file turn of dependency check during build. This could be dangerous so be careful before you use it.

다른 팁

Another option is to filter out the automatic dependency script's output. I document here how to do it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top