in reply to Re^2: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"
in thread LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"

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.

  • Comment on Re^3: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported"
by Intrepid (Curate) on Mar 19, 2025 at 02:43 UTC

    Ok, getting back to you, ikegami, wrt to where you said:

    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.

    I've just run a couple commands in the shell to check this. Recollecting that bash sources /etc/profile for a login shell, we become root using the flag that tells bash it is a login shell, and check its environment:

    somian@antique-acer:~/repos$ sudo bash -login -i root@antique-acer:/home/somian/repos# env | grep ^PERL PERL5LIB=/usr/share/perl5

    Now we do that same but leave out the -login flag, and PERL5LIB vanishes:

    somian@antique-acer:~/repos$ sudo bash -i root@antique-acer:/home/somian/repos# env | grep ^PERL root@antique-acer:/home/somian/repos#

    The apparent conclusion is that $PERL5LIB is not inherited when running as root, and furthermore won't be set when bash's root child process starts if one's setup is such that we set it in /etc/profile (which seems to me to be the "right" place for it).

    As I wrote before: "I was running as root because I wanted to store my pinto stacks under /usr/local/lib/pinto." Just not one of my brighter ideas, and I put it down to not having enough *nix knowledge. Now I am setting up repositories under my home dir and things are working as they should.

    Mar 19, 2025 at 02:42 UTC