I need to install Strawberry Perl and many Perl modules (with dependencies) on a Windows machine without the access to the internet (for security reasons).
Offline installation of Strawberry Perl works perfectly, but I did not manage to install additional modules I need.
I prepared a CPAN like repository on a Ubuntu machine using Pinto:
pinto --root my_repo init
pinto --root my_repo pull -M Some::Mudule1 Some::Mudule2
Then I transferred my_repo
directory to the target machine as C:\some\path\my_repo
and tried:
cpanm --mirror "file://C:/some/path/my_repo" --mirror-only Some::Mudule1 Some::Mudule2
But it ended up with error message:
! cannot open file 'C:\Users\dedek/.cpanm/sources/file%C%some%path%my_repo/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Some::Mudule1
! cannot open file 'C:\Users\dedek/.cpanm/sources/file%C%some%path%my_repo/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Some::Mudule2
Why is cpanm
looking for such strange location? How can I fix it? Is there a simpler way how to install Perl modules offline? It would be also nice if I could prepare the CPAN like repository on a Windows machine. But I did not succeed to install Pinto on Windows, is it possible?