Closed bilogic closed 1 year ago
Can't write-open blib/man3/Module::CoreList.3pm
Looks like opening non existing file.
Installing Module::CoreList failed.
Generally speaking, Perl has Module::CoreList by default.
Does your Perl have Module::CoreList?
perldoc -l Module::CoreList
The setup logic is
https://github.com/yuki-kimoto/gitprep/blob/master/setup_module
perldoc -l Module::CoreList
Yes
/usr/share/perl/5.34/Module/CoreList.pod
Module/CoreList.pm is not found.
/usr/share/perl/5.34/Module/CoreList.pod
Please tell me the result of the following commands.
perl -MModule::CoreList -e 1
corelist -h
perl -MModule::CoreList -e 1
Blank output
Sorry
perl -MModule::CoreList -e 1
echo $?
And
corelist -h
perl -MModule::CoreList -e 1 echo $?
0
corelist -h
Shows the help
just in case this issue is still valid:
Possibly you don't have the full Perl installed; perl-base is a minimal perl without which Debian/Ubuntu distros will not finish booting.
Try installing the normal perl:
apt-get install perl perl-doc perl-modules-5.34
apt-get install perl perl-doc perl-modules-5.34
[/]# apt-get install perl perl-doc perl-modules-5.34
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
perl is already the newest version (5.34.0-3ubuntu1.1).
perl-doc is already the newest version (5.34.0-3ubuntu1.1).
perl-modules-5.34 is already the newest version (5.34.0-3ubuntu1.1).
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
I supposed this means it was already installed
can you try this and attach or post here the full log ?
cpanm -v -L extlib Module::CoreList 2>&1 | tee test.log
^ this will attempt to install Module::CoreList under the extlib folder.
it should not be writing anything outside of the gigprep/extlib folder though, and I can't find any .3pm files under it.
I've updated the code (very small changes ) to run with Perl 5.36.0 here https://github.com/emil-perhinschi/gitprep/tree/perl3_36_0 ... branch perl3_36_0 , maybe this will work for you.
Just in case: removing the folder extlib and the contents helps if cpanm gets confused about something being installed or not.
[/]# cpanm -v -L extlib Module::CoreList 2>&1 | tee test.log
cpanm (App::cpanminus) 1.7045 on perl 5.034000 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1668088185.399791
You have make /usr/bin/make
You have /usr/bin/wget
You have /usr/bin/tar: tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Module::CoreList () on cpanmetadb ...
--2022-11-10 21:49:45-- http://cpanmetadb.plackperl.org/v1.0/package/Module::CoreList
Resolving cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ...
Connecting to cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)|151.101.2.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 159 [text/yaml]
Saving to: ‘STDOUT’
0K 100% 52.1M=0s
2022-11-10 21:49:46 (52.1 MB/s) - written to stdout [159/159]
--> Working on Module::CoreList
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/Module-CoreList-5.20221020.tar.gz ... --2022-11-10 21:49:46-- http://www.cpan.org/authors/id/B/BI/BINGOS/Module-CoreList-5.20221020.tar.gz
Resolving www.cpan.org (www.cpan.org)... 151.101.1.55, 151.101.65.55, 151.101.129.55, ...
Connecting to www.cpan.org (www.cpan.org)|151.101.1.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 125121 (122K) [application/x-gzip]
Saving to: ‘Module-CoreList-5.20221020.tar.gz’
0K .......... .......... .......... .......... .......... 40% 9.19M 0s
50K .......... .......... .......... .......... .......... 81% 25.9M 0s
100K .......... .......... .. 100% 9.43M=0.009s
2022-11-10 21:49:46 (12.6 MB/s) - ‘Module-CoreList-5.20221020.tar.gz’ saved [125121/125121]
Unpacking Module-CoreList-5.20221020.tar.gz
OK
Module-CoreList-5.20221020/
Module-CoreList-5.20221020/corelist
Module-CoreList-5.20221020/META.json
Module-CoreList-5.20221020/MANIFEST
Module-CoreList-5.20221020/identify-dependencies
Module-CoreList-5.20221020/t/
Module-CoreList-5.20221020/t/corelist.t
Module-CoreList-5.20221020/t/maintainer.t
Module-CoreList-5.20221020/t/find_modules.t
Module-CoreList-5.20221020/t/utils.t
Module-CoreList-5.20221020/t/is_core.t
Module-CoreList-5.20221020/t/pod.t
Module-CoreList-5.20221020/t/deprecated.t
Module-CoreList-5.20221020/Changes
Module-CoreList-5.20221020/lib/
Module-CoreList-5.20221020/lib/Module/
Module-CoreList-5.20221020/lib/Module/CoreList/
Module-CoreList-5.20221020/lib/Module/CoreList/Utils.pm
Module-CoreList-5.20221020/lib/Module/CoreList.pod
Module-CoreList-5.20221020/lib/Module/CoreList.pm
Module-CoreList-5.20221020/README
Module-CoreList-5.20221020/META.yml
Module-CoreList-5.20221020/Makefile.PL
Entering Module-CoreList-5.20221020
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.62)
Running Makefile.PL
Configuring Module-CoreList-5.20221020 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Module::CoreList
Writing MYMETA.yml and MYMETA.json
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (1.302183)
Checking if you have version 0.88 ... Yes (0.9928)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.62)
Checking if you have List::Util 0 ... Yes (1.55)
OK
Building and testing Module-CoreList-5.20221020 ... cp lib/Module/CoreList.pm blib/lib/Module/CoreList.pm
cp lib/Module/CoreList/Utils.pm blib/lib/Module/CoreList/Utils.pm
cp lib/Module/CoreList.pod blib/lib/Module/CoreList.pod
cp corelist blib/script/corelist
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/corelist
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/corelist.t ...... ok
t/deprecated.t .... ok
t/find_modules.t .. ok
t/is_core.t ....... ok
t/maintainer.t .... skipped: These tests only run in core
t/pod.t ........... skipped: Test::Pod 1.00 required for testing POD
t/utils.t ......... ok
All tests successful.
Files=7, Tests=102, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.80 cusr 0.07 csys = 0.90 CPU)
Result: PASS
Installing /extlib/lib/perl5/Module/CoreList.pm
Installing /extlib/lib/perl5/Module/CoreList.pod
Installing /extlib/lib/perl5/Module/CoreList/Utils.pm
Installing /extlib/bin/corelist
Appending installation info to /extlib/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
OK
Successfully installed Module-CoreList-5.20221020 (upgraded from 5.20210520)
Installing /extlib/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-CoreList-5.20221020/install.json
Installing /extlib/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-CoreList-5.20221020/MYMETA.json
1 distribution installed
Is this all that you want to try? Thank you.
Sorry but why did you install it as root and outside the gitprep folder ? ... setup_module is installing Perl libraries only under gitprep/libext/
If you install Perl modules as root regularly you risk messing up your system, and you need it to finish booting.
If you want full control you have the "perlbrew" recommendation in the README.
Sorry, I'm not familiar with perl setup etc, I thought it was just like apt
which can be executed from any directory. I happened to be logged in as root, does that affect this command?
[/var/www/stage/gitprep/gitprep]# cpanm -v -L extlib Module::CoreList 2>&1 | tee test.log
cpanm (App::cpanminus) 1.7045 on perl 5.034000 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1668104295.463193
You have make /usr/bin/make
You have /usr/bin/wget
You have /usr/bin/tar: tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Module::CoreList () on cpanmetadb ...
--2022-11-11 02:18:15-- http://cpanmetadb.plackperl.org/v1.0/package/Module::CoreList
Resolving cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)... 199.232.46.217
Connecting to cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)|199.232.46.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 159 [text/yaml]
Saving to: ‘STDOUT’
0K 100% 41.0M=0s
2022-11-11 02:18:16 (41.0 MB/s) - written to stdout [159/159]
--> Working on Module::CoreList
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/Module-CoreList-5.20221020.tar.gz ... --2022-11-11 02:18:16-- http://www.cpan.org/authors/id/B/BI/BINGOS/Module-CoreList-5.20221020.tar.gz
Resolving www.cpan.org (www.cpan.org)... 199.232.45.55, 2a04:4e42:48::311
Connecting to www.cpan.org (www.cpan.org)|199.232.45.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 125121 (122K) [application/x-gzip]
Saving to: ‘Module-CoreList-5.20221020.tar.gz’
0K .......... .......... .......... .......... .......... 40% 9.45M 0s
50K .......... .......... .......... .......... .......... 81% 18.2M 0s
100K .......... .......... .. 100% 11.9M=0.01s
2022-11-11 02:18:16 (12.3 MB/s) - ‘Module-CoreList-5.20221020.tar.gz’ saved [125121/125121]
Unpacking Module-CoreList-5.20221020.tar.gz
OK
Module-CoreList-5.20221020/
Module-CoreList-5.20221020/corelist
Module-CoreList-5.20221020/META.json
Module-CoreList-5.20221020/MANIFEST
Module-CoreList-5.20221020/identify-dependencies
Module-CoreList-5.20221020/t/
Module-CoreList-5.20221020/t/corelist.t
Module-CoreList-5.20221020/t/maintainer.t
Module-CoreList-5.20221020/t/find_modules.t
Module-CoreList-5.20221020/t/utils.t
Module-CoreList-5.20221020/t/is_core.t
Module-CoreList-5.20221020/t/pod.t
Module-CoreList-5.20221020/t/deprecated.t
Module-CoreList-5.20221020/Changes
Module-CoreList-5.20221020/lib/
Module-CoreList-5.20221020/lib/Module/
Module-CoreList-5.20221020/lib/Module/CoreList/
Module-CoreList-5.20221020/lib/Module/CoreList/Utils.pm
Module-CoreList-5.20221020/lib/Module/CoreList.pod
Module-CoreList-5.20221020/lib/Module/CoreList.pm
Module-CoreList-5.20221020/README
Module-CoreList-5.20221020/META.yml
Module-CoreList-5.20221020/Makefile.PL
Entering Module-CoreList-5.20221020
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.64)
Running Makefile.PL
Configuring Module-CoreList-5.20221020 ... Checking if your kit is complete...
Looks good
Have /usr/lib/x86_64-linux-gnu/perl-base
Want /usr/lib/x86_64-linux-gnu/perl/5.34
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [perl-base]
Config says: [x86_64-linux-gnu-thread-multi]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Generating a Unix-style Makefile
Writing Makefile for Module::CoreList
Writing MYMETA.yml and MYMETA.json
Checking dependencies from MYMETA.json ...
Checking if you have List::Util 0 ... Yes (1.55)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.64)
Checking if you have Test::More 0 ... Yes (1.302183)
Checking if you have version 0.88 ... Yes (0.9928)
OK
Building and testing Module-CoreList-5.20221020 ... cp lib/Module/CoreList.pm blib/lib/Module/CoreList.pm
cp lib/Module/CoreList.pod blib/lib/Module/CoreList.pod
cp lib/Module/CoreList/Utils.pm blib/lib/Module/CoreList/Utils.pm
cp corelist blib/script/corelist
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/corelist
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/corelist.t ...... ok
t/deprecated.t .... ok
t/find_modules.t .. ok
t/is_core.t ....... ok
t/maintainer.t .... skipped: These tests only run in core
t/pod.t ........... skipped: Test::Pod 1.00 required for testing POD
t/utils.t ......... ok
All tests successful.
Files=7, Tests=102, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.89 cusr 0.11 csys = 1.04 CPU)
Result: PASS
Installing /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/Module/CoreList.pm
Installing /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/Module/CoreList.pod
Installing /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/Module/CoreList/Utils.pm
Installing /media/sf_www/stage/gitprep/gitprep/extlib/bin/corelist
Appending installation info to /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
OK
Successfully installed Module-CoreList-5.20221020 (upgraded from 5.20210520)
Installing /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-CoreList-5.20221020/install.json
Installing /media/sf_www/stage/gitprep/gitprep/extlib/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-CoreList-5.20221020/MYMETA.json
1 distribution installed
In most Linuxes you have a system Perl which is advised you leave alone, so most install perl under a user's home using perlbrew, the way it is suggested to do with gitprep in the README.
If you install something with root privileges and then run it with root privileges you expose your system to be hacked. If run a service with fewer privileges (apache for example is running under the user www-data, others are using the user "nobody") you're less vulnerable.
I am using right now perlbrew to manage the versions of Perl I have installed. You can find it at perlbrew.pl (.pl because Polish domains used to be cheap and you bought them for ever :-), also because of Perl, not because Eastern Europeans made it).
The error you used to get was probably caused by you running the install with root, not completing, then trying with a normal user, which could not overwrite the files created by root ... a guess only.
I'm running everything as root right now just to be sure I have a fix before I address the security issues. I'm still getting this
Manifying 1 pod document
Can't write-open blib/man3/Module::CoreList.3pm: Protocol error at /usr/share/perl/5.34/ExtUtils/Command/MM.pm line 153.
Manifying 2 pod documents
make: *** [Makefile:426: manifypods] Error 71
-> FAIL Installing Module::CoreList failed. See /media/sf_www/stage/gitprep/gitprep/setup/work/1668106103.27047/build.log for details.
Hmm...
Wait.. it seems to work now after running cpanm -v -L extlib Module::CoreList
again
[/media/sf_www/stage/gitprep/gitprep]# ./setup_module
Module::CoreList is up to date. (5.20221020)
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.64.tar.gz ... OK
Configuring ExtUtils-MakeMaker-7.64 ... OK
Building and testing ExtUtils-MakeMaker-7.64 ...
// still running
Ok, I'm able to compile now. It seems to be a broken tar source code file from earlier.
It was named gitprep-latest.tar.gz
, so I downloaded the gitprep-master.tar.gz
this time and all the steps worked.
Thank you.
Any idea? Thank you.