--- layout: post title: cpanm error "No such file or directory opening compressed index" category: Perl tags: - cpan --- If you ever get this error while installing a module `cpanm`: ``` ! Finding install on cpanmetadb failed. ! cannot open file '/root/.cpanm/sources/http%www.cpan.org/02packages.details.txt.gz': No such file or directory opening compressed index ! Couldn't find module or a distribution install ``` The problem is caused by not having the `LWP::Protocol::https` module installed, and the solution is to run `cpanm` with the `--no-lwp` option or installing `LWP::Protocol::https`.