Software⏱️ 3 min read📅 2026-06-19

How to Fix Error code 130 Error – cpan fails with "Error code 130, while making 'pm_to_blib'"

Error code 130 occurs when CPAN fails to copy lib/App/cpanminus.pm to blib/lib/App/cpanminus.pm during installation.

Quick Answer: Try reinstalling Strawberry Perl or using the --skip-test option with cpan.

I recently installed Perl on my Windows 7 machine. Upon running cpan App::cpanminus, I got the following error:

This issue affects users who have installed Perl on their Windows systems and are trying to install or update the cpanminus module.

💡 Why You Are Getting This Error

  • The first main reason why this error happens is due to a missing 'blib' directory in the Perl installation. The 'blib' directory is used as a cache for compiled modules, and its absence can cause issues during the installation process.
  • Another alternative reason could be that the 'perl' executable is not correctly set up or is pointing to a non-existent location.

🔧 Proven Troubleshooting Steps

Fixing the issue by creating the missing 'blib' directory

  1. Step 1: Step 1: Open a command prompt as an administrator. Type 'cd D:\Strawberry\cpan' and press Enter.
  2. Step 2: Step 2: Run the command 'perl Makefile.PL INSTALL_BASE=D:\Strawberry\cpan' to specify the installation base for the 'blib' directory.
  3. Step 3: Step 3: Once the process is complete, try running cpan App::cpanminus again.

Alternative fix method using Strawberry Perl's built-in 'make install'

  1. Step 1: Step 1: Open a command prompt as an administrator. Type 'dmake -n' to see the list of build options.
  2. Step 2: Step 2: Run the command 'dmake make_install' to attempt installing the module in the correct location.

🎯 Final Words

To fix this issue, you can try either method described above. If you're still experiencing problems, it's recommended to seek further assistance from the Perl community or a Windows expert familiar with Perl installations.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions