Intrepid has asked for the wisdom of the Perl Monks concerning the following question:

I'm going to go ahead and ask for help even though I know the problem may be a fubar'd system. I'm setting up pinto and am trying my first "pull" from CPAN, and getting an error:

Failed to mirror https://cpan.perl.org/modules/02packages.details.txt.gz: 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

Thing is, LWP::Protocol::https certainly is installed, as are the dependencies Net::SSLeay and IO::Socket::SSL. Is it something pinto is doing, manipulating @INC or otherwise causing this failure?

Thank you again (I seem to post in SoPW once a week these days!), good Monks.

Mar 17, 2025 at 01:50 UTC

A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)

  • Comment on LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"

Replies are listed 'Best First'.
Re: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"
by swl (Prior) on Mar 17, 2025 at 03:22 UTC

    Are you checking for LWP::Protocal::https with the same perl you are using for the CPAN calls? I've hit this error in the past where the cpanm call was using the system perl and not the intended perl (I forget if that was perlbrew, homebrew, msys2 or some other source).

Re: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"
by ikegami (Patriarch) on Mar 17, 2025 at 16:13 UTC
    Please provide the output of these:
    printf 'pinto: %s\n' "$( which pinto )" printf 'perl: %s\n' "$( which perl )" printf 'pinto shebang: %s\n' "$( head -n 1 "$( which pinto )" )" printf 'PATH=%s\n' "$PATH" env | grep ^PERL # Use the output from `head` above minus the `#!` instead of `perl`. perl -e'use LWP::Protocol::https'

      Hello ikegami, your participation is much appreciated. Here's what the system I'm working on shows for your suggested commands:

      somian@antique-acer:~$ printf 'pinto: %s\n' "$( which pinto )"
      pinto: /usr/local/bin/pinto
      somian@antique-acer:~$ printf 'perl: %s\n' "$( which perl )"
      perl: /usr/local/bin/perl
      somian@antique-acer:~$ printf 'pinto shebang: %s\n' "$( head -n 1 "$( which pinto )" )"
      pinto shebang: #!/usr/local/bin/perl
      somian@antique-acer:~$ printf 'PATH=%s\n' "$PATH"
      PATH=/usr/lib/distcc/bin:/home/somian/.local/bin:/home/somian/local/bin:/usr/local/bin:/usr/bin:/bin
      somian@antique-acer:~$ env | grep ^PERL
      PERL5LIB=/usr/share/perl5
      somian@antique-acer:~$ /usr/local/bin/perl -e'use LWP::Protocol::https'
      somian@antique-acer:~$
      

      What this tells us is that /usr/local/bin/perl is consistently the perl that's being invoked. I added another such test, to see where LWP::Protocol::https is found:

        /usr/local/bin/perl -e'use LWP::Protocol::https; print qq$LWP::Protocol::https::VERSION = ,$INC{"LWP/Protocol/https.pm"}.$/'
      6.07 = /usr/share/perl5/LWP/Protocol/https.pm
      

      I don't know if we're closer to solving this, but I enjoy playing around with commands in the shell for its own sake :-).

      I've got a suspicion now, that my attempted pinto command was failing because I was running as root, under sudo. Question: if I run a perl script as root using sudo, will $PERL5LIB not be present in the environment as it is for the normal user? PERL5LIB is declared in /etc/profile on my system (Debian Gnu/Linux).

      I was running as root because I wanted to store my pinto stacks under /usr/local/lib/pinto, and I keep running into perm problems. If I try using the invocation above without being root, this happens:

      somian@antique-acer:~$ pinto --root /usr/local/lib/pinto/pinto1 pull D +ateTime DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::SQLite: +:st execute failed: attempt to write a readonly database [for Stateme +nt "INSERT INTO revision ( has_changes, is_committed, message, time_o +ffset, username, utc_time, uuid) VALUES ( ?, ?, ?, ?, ?, ?, ? )" with + ParamValues: 1=0, 2=0, 3='', 4=0, 5='', 6=1742241369, 7='ba2d5883-f3 +7c-45f2-8a81-ea701e4e7172'] at (eval 912) line 1
      Mar 17, 2025 at 20:15 UTC

        Running the commands in a different environment one than where you get the problem is not too useful, at least not on its own. Please run them in the same way as you normally run pinto.

        I haven't played much with sudo and how it affects the environment, but it seems possible that PERL5LIB isn't inherited or set in the child.