Bruce, Interesting, I didn’t know that MyCpan.pm defaulted make install to run under sudo. FWIW I’ve been running sudo cpan on macOS for almost 20 years with no ill effects.
I just tested to make sure it worked without sudo (after chowning ~/.cpan), and it didn’t; it wouldn’t have worked with sudo either: t/02-pod-coverage.t ........ Can't locate Pod/Find.pm in @INC (you may need to install the Pod::Find module) (@INC contains: /Users/john/.cpan/build/Finance-Quote-1.63-1/blib/lib /Users/john/.cpan/build/Finance-Quote-1.63-1/blib/arch /Library/Perl/5.34/darwin-thread-multi-2level /Library/Perl/5.34 /Network/Library/Perl/5.34/darwin-thread-multi-2level /Network/Library/Perl/5.34 /Library/Perl/Updates/5.34.1/darwin-thread-multi-2level /Library/Perl/Updates/5.34.1 /System/Library/Perl/5.34/darwin-thread-multi-2level /System/Library/Perl/5.34 /System/Library/Perl/Extras/5.34/darwin-thread-multi-2level /System/Library/Perl/Extras/5.34 .) at /Library/Perl/5.34/Pod/Coverage.pm line 6. BEGIN failed--compilation aborted at /Library/Perl/5.34/Pod/Coverage.pm line 6. Compilation failed in require at /Library/Perl/5.34/Test/Pod/Coverage.pm line 86. BEGIN failed--compilation aborted at /Library/Perl/5.34/Test/Pod/Coverage.pm line 86. Compilation failed in require at t/02-pod-coverage.t line 5. BEGIN failed--compilation aborted at t/02-pod-coverage.t line 5. t/02-pod-coverage.t ........ Dubious, test returned 2 (wstat 512, 0x200) No subtests run And trying to install Pod::Find fails because Result: PASS MAREKR/Pod-Parser-1.67.tar.gz /usr/bin/make test -- OK Running make install for MAREKR/Pod-Parser-1.67.tar.gz Manifying 1 pod document Manifying 6 pod documents !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/usr/bin' Do not have write permissions on '/usr/bin' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at -e line 1. make: *** [pure_perl_install] Error 1 MAREKR/Pod-Parser-1.67.tar.gz sudo /usr/bin/make install -- NOT OK Why is Pod-Parser trying to install something in /usr/bin instead of /usr/local/bin? Probably not Flavio’s problem (at least not yet), he doesn’t seem to have gotten anything installed. Regards, John Ralls > On Oct 5, 2024, at 18:31, Bruce Schuck <bsch...@asgard-systems.com> wrote: > > On 10/5/24 5:39 PM, John Ralls wrote: > >> As I explained in my previous, cpan needs to write to /Library/ >> Perl/3.40/, a system directory, so it need to be run with sudo. Of >> course doing that causes the ownership of ~/.cpan to be root. > > John, > > I *know* how CPAN works. Typically the default MyConfig.pm > (~/.cpan/CPAN/MyConfig.pm) will use sudo for the "make_install_make_command" > and "mbuild_install_build_command" commands. This allows cpan to write to the > system directories needed. But a user's ~/.cpan tree should always be > writable by the user. Running "sudo cpan ..." ends up making a mess of user's > cpan directory and leaves files and directories the user cannot write to, and > BF's issue trying to run "cpan Finance::Quote" is an example. I assumed the > install FQ tool supplied with GnuCash did not run "sudo cpan" and instead > depended on sudo being called to execute the install. I can assure you, most > long time Perl monks would chastise those who execute "sudo cpan". > > https://stackoverflow.com/questions/9409888/when-using-cpan-in-linux-ubuntu-should-i-run-it-using-sudo-as-root-or-as-my-de > > I'm guessing the FQ install tool uses "sudo cpan" to avoid issues where users > may have changed their cpan config from the default. But again, this could > lead to other problems. Example if someone had set their cpan config to build > into $PERL5LIB, typically under their $HOME and done to avoid needing root > privs. Running "sudo cpan ..." in that case would install root owned modules > in a directory space the user expects to own everything underneath. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.