thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

"Couldn't find module or a distribution Pinto" #249

Open lsiden opened 5 years ago

lsiden commented 5 years ago

When I attempt to run the install script downloaded from http://getpinto.stratopan.com it fails with the message "Couldn't find module or a distribution Pinto".

Steps:

Output is

set -ue
+ PINTO_REPO_URL=https://www.stratopan.com/thaljef/OpenSource/pinto-release
+ PINTO_HOME=/var/pinto
+ '[' -z ']'
+ type curl
+ PINTO_INSTALLER_AGENT=curl
+ PINTO_CPANM_URL=https://raw.githubusercontent.com/thaljef/Pinto/master/etc/cpanm
+ PINTO_SBIN=/var/pinto/sbin
+ PINTO_CPANM_EXE=/var/pinto/sbin/cpanm
+ mkdir -p /var/pinto/sbin
+ '[' curl = curl ']'
+ curl -k --show-error --location https://raw.githubusercontent.com/thaljef/Pinto/master/etc/cpanm
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100  294k  100  294k    0     0   503k      0 --:--:-- --:--:-- --:--:--  502k
+ chmod 755 /var/pinto/sbin/cpanm
+ echo 'Installing pinto into /var/pinto'
Installing pinto into /var/pinto
+ export PERL_USE_UNSAFE_INC=1
+ PERL_USE_UNSAFE_INC=1
+ /var/pinto/sbin/cpanm --notest --quiet --mirror https://www.stratopan.com/thaljef/OpenSource/pinto-release --mirror-only --local-lib-contained /var/pinto --man-pages Pinto
! Couldn't find module or a distribution Pinto

I checked https://www.stratopan.com/thaljef/OpenSource/pinto-release and Pinto is indeed present.

I also tried to install Pinto directly from CPAN using Perl 5.28.0 and 5.26.1, but that fails in one of the tests (I believe in t/02-bowels/41-log.t).

Please advise which way you recommend that I proceed.

lsiden commented 5 years ago

Got a bit more info to work with. I edited the script again, removed "--quiet" and added "-v" to the cpanm command in the script and got

ERROR: cannot verify www.stratopan.com's certificate, issued by ‘/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA’:
  Issued certificate has expired.
To connect to www.stratopan.com insecurely, use `--no-check-certificate'.

However, when I added --no-check-certificate, I still get the same result.

Still stumped.

barefootcoder commented 5 years ago

You're running into the same issue as #246. Still no word back from Jeffery on this, unfortunately. :-(

hartzell commented 5 years ago

cpanm calls curl internally. You can create a ~/.curlrc file that contains -k and things should work. E.g.

# HEADS UP, DON'T DO THIS IS YOU HAVE IMPORTANT THINGS IN ~/.curlrc;
# append, or use vi, or ...
(alice)[15:04:46]~>>echo "-k" > ~/.curlrc

If you can't do that for some reason, but have access to wget, you can use it's configuration file (man wget) to pull the same trick.

hartzell commented 5 years ago

p.s.: REMOVE THIS OPTION WHEN YOU'RE DONE, otherwise you're disabling validation for everything.

hartzell commented 5 years ago

FWIW, if you're on a system where cpanm chooses to use wget instead of curl, you can achieve the same end be creating a ~/.wgetrc that contains (at least):

check-certificate=off

Same caveat about cleaning up after you're done.

tomwitt2 commented 5 years ago

The ~/.curlrc and ~/.wgetrc suggestions to disable certificate checking did not work for me.

Does anybody else have viable workaround?