HP-UX系统下ExtUtils-MakeMaker模块安装失败求助
Solution for "Can't configure the distribution. You probably need to have 'make'" on HP-UX
I’ve dealt with similar quirks on HP-UX before—since you’ve already verified that gmake is installed and Perl is set to use it (perl -V:make returns make='gmake'), here are a few targeted fixes to get ExtUtils-MakeMaker installed:
1. Force cpanm to use gmake directly
cpanm might not be picking up Perl’s configured make setting automatically. Override it explicitly with the --make flag:
cpanm --make gmake ExtUtils-MakeMaker-7.30.tar.gz
This tells cpanm to skip looking for a generic make command and use gmake directly.
2. Verify gmake is in your PATH
Even if gmake is installed, if its directory isn’t in your PATH, cpanm might fail to find it. Check with:
which gmake
If this returns nothing, add the path to gmake (common locations on HP-UX are /usr/local/bin or /opt/gnu/bin) to your PATH temporarily:
export PATH=$PATH:/usr/local/bin
Then re-run your cpanm command.
3. Manual installation fallback
If cpanm still misbehaves, install the module manually—this bypasses any cpanm-specific path or configuration issues:
- Extract the tarball:
tar zxvf ExtUtils-MakeMaker-7.30.tar.gz cd ExtUtils-MakeMaker-7.30 - Generate the Makefile with Perl:
perl Makefile.PL - Compile, test (optional), and install with gmake:
gmake gmake test # Optional but recommended to check for issues gmake install
Why this happens
HP-UX comes with a native make tool that’s often incompatible with Perl modules (which expect GNU make). Even though Perl is configured to use gmake, cpanm sometimes defaults to searching for make first instead of respecting Perl’s setting. The fixes above either force cpanm to use gmake directly or ensure it can find the correct tool in your environment.
内容的提问来源于stack exchange,提问作者Rutnet

