Question: How do I fix “Error: no suitable installation target found for package” error message that I received when installing a perl module using ppm install?
Answer: When we are behind firewall, we would opt for ‘ppm through local repository’ to install perl modules, which is the very easiest way. When installing perl module using ppm local repository, we often come across the error “Error: no suitable installation target found for package” as shown below.
C:\DBD>ppm install DBD-DB2 Error: no suitable installation target found for package DBD-DB2 (or) $ ppm install DBD-DB2 Error: no suitable installation target found for package DBD-DB2
In this article, let us review how to fix the “Error: no suitable installation target found for package DBD-DB2″ while installing any perl packages.
The instructions below explains how to fix this problem on windows platform. But, you can follow similar steps on Linux to fix the same issue.
Solution to Fix Error: no suitable installation target found for package
1. Download the ppd file and package
Download the following PPD and package files
Note: Make sure to replace DBD-DB2 with your corresponding package name.
2. Create a Directory to keep downloads
Create DBD directory to store the downloaded ppd file.
C:\> mkdir DBD
Create X86 directory to keep downloaded tar file.
Now it should looks like :
C:\DBD>dir Volume in drive C is SYS Volume Serial Number is 1223-34B3 Directory of C:\DBD 01/12/2009 03:33 PM . 01/12/2009 03:33 PM .. 01/12/2009 12:02 PM 391 DBD-DB2.ppd 01/12/2009 03:33 PM x86 C:\DBD> dir x86 Volume in drive C is SYS Volume Serial Number is 1223-34B3 Directory of C:\DBD 01/12/2009 03:33 PM . 01/12/2009 03:33 PM .. 01/12/2009 02:37 PM 100,859 DBD-DB2.tar.gz
3. Open the ppd file and Edit the CODEBASE HREF to path of package.tar.gz
<SOFTPKG NAME="DBD-DB2" VERSION="1,7,1,0"> <TITLE>DBD-DB2</TITLE> <ABSTRACT>Perl driver for IBM DB2 Universal Database</ABSTRACT> <AUTHOR>DB2 Perl (firstname.lastname@example.org)</AUTHOR> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="x86\DBD-DB2.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
Note: CODEBASE HREF should have the path of tar ball from the directory where ppd file is located.
4. Add the Local repository using ppm repo add
C:\>ppm repo add repositoryname Fullpath C:\>ppm repo add Local C:\DBD
5. Verify the repository added using ppm repo
C:\DBD>ppm repo Repositories  Local [ ] ActiveState Package Repository
6. Issue Resolved: Now ppm install it will go through fine
C:\DBD>ppm install DBD-DB2.ppd ======================= Install 'DBD-DB2' version 1.7.1 in ActivePerl 22.214.171.1246 ======================= Installing C:\Perl\site\lib\auto\DBD\DB2\DB2.bs Installing C:\Perl\site\lib\auto\DBD\DB2\DB2.dll Installing C:\Perl\site\lib\auto\DBD\DB2\Constants\Constants.bs Installing C:\Perl\site\lib\auto\DBD\DB2\Constants\Constants.dll Installing C:\Perl\site\lib\auto\DBD\DB2\Constants\Constants.dll Installing C:\Perl\html\site\lib\DBD\DB2.html Installing C:\Perl\html\site\lib\Bundle\DBD\DB2.html Installing C:\Perl\site\lib\DBD\DB2.pm Installing C:\Perl\site\lib\DBD\DB2.pod Installing C:\Perl\site\lib\DBD\DB2\Constants.pm Installing C:\Perl\site\lib\Bundle\DBD\DB2.pl Installing C:\Perl\site\lib\auto\DBD\DB2\Constants\autosplit.ix Successfully installed DBD-DB2 version 1.7.1 in ActivePerl 126.96.36.1996
Even after following all the above steps properly, if you are still getting the same error “Error: no suitable installation target found for package”. Check the version of module that you are trying to install and version of perl. To see the details (version) about the module that you are going to install, use ppm desc i.e describe.
C:\DBD>ppm desc DBD-DB2 ======================== Name : DBD-DB2 Version : 1.7.1 Author: DB2 Perl >email@example.com> Title: DBD-DB2 Abstract: Perl driver for IBM DB2 Universal Database Location: local Available Platforms: 1. MSWin32-x86-multi-thread-5.8
Use perl -v to see version of the perl.
C:\DBD>perl -v This is perl, V5.8.0 built for MSWin32-x86-multi-thread
The version of the module you are trying to install should have build for your perl version. In the above example in the description of the module shows that “Available Platforms: MSWin32-x86-multi-thread-5.8″ refers that it is built for 5.8. If this version number does not match you will get this error, then you should download the correct version of module.
Get the Linux Sysadmin Course Now!