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).
| [reply] |
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'
| [reply] [d/l] |
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 | [reply] [d/l] |
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.
| [reply] [d/l] [select] |