Loading internal logger. Log::Log4perl recommended for better logging
Terminal does not support AddHistory.
To fix that, maybe try> install Term::ReadLine::Perl
cpan shell -- CPAN exploration and modules installation (v2.36)
Enter 'h' for help.
cpan[1]>
وقتی هم میخوام ماژول لاگ فور پرل رو هم نصب کنم این خروجی رو میده:cpan[1]> install Log::Log4perl
Reading '/home/learner/.cpan/Metadata'
Warning: Found only 0 objects in /home/learner/.cpan/Metadata
Trying with
/usr/bin/wget -O "/home/learner/.cpan/sources/authors/01mailrc.txt.gz.tmp45963"
to get
https://cpan.org/authors/01mailrc.txt.gz
--2024-09-05 11:05:30-- https://cpan.org/authors/01mailrc.txt.gz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving cpan.org (cpan.org)... 151.101.193.55, 151.101.1.55, 151.101.129.55, ...
Connecting to cpan.org (cpan.org)|151.101.193.55|:443... connected.
و هیچ اتفاقی نمیفته. با cpanm هم تست کردم ولی مثل اینکه که ماژول هایی که نصب میکزد تمومی نداشتند!! و خودم کنترل سی زدم و cpanm رو حذف کردم.[sudo] password for learner:
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing perl breaks dependency 'perl' required by autoconf
:: removing perl breaks dependency 'perl' required by automake
:: removing perl breaks dependency 'perl' required by dpkg
:: removing perl breaks dependency 'perl' required by evolution-data-server
:: removing perl breaks dependency 'perl' required by git
:: removing perl breaks dependency 'perl' required by groff
:: removing perl breaks dependency 'perl' required by hyphen
:: removing perl breaks dependency 'perl' required by inxi
:: removing perl breaks dependency 'perl' required by net-snmp
:: removing perl breaks dependency 'perl' required by perl-error
:: removing perl breaks dependency 'perl' required by perl-timedate
:: removing perl breaks dependency 'perl' required by texinfo
احساس میکنم سیستم رو خیلی درگیر کردم و پکیج های اضافه زیادی نصب کردم. چیکار کنم؟؟بهتره بستهها رو از مخازن خود توزیع نصب کنید، نه از cpan.شاید ولی آخرش باید مشکلش رو رفع کنم نمیشه دست رو دست گذاشت.
هنوز نرمافزارهای سیستمیای هستند که از Perl استفاده میکنند، برای این حذف کردنش کار درستی نیست و اگر حذفش کنید، احتمالا چیزهای زیادی دیگه کار نمیکنند.ای کاش زودتر میگفتید!
Clone.c: loadable library and perl binaries are mismatched (got first handshake key 0xf380080, needed 0xeb80080)
Parser.c: loadable library and perl binaries are mismatched (got first handshake key 0xf380080, needed 0xeb80080)
اصلا منظورش از loadable library and perl binaries are mismatched چیه؟؟؟؟؟!!باید چیکار کنم
which perl
دروداول از چتجیپیتی بپرس :)
من الان سیستم رو دوباره نصب کردم و آوردم بالا.
قدرت پرل رو دست کم گرفته بودم!!! سوالات زیادی دارم که باید بپرسم...
Can't locate Perl/LanguageServer.pm in @INC (you may need to install the Perl::LanguageServer module) (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/vendor_perl/5.38.2/x86_64-linux /usr/lib/perl5/vendor_perl/5.38.2 /usr/lib/perl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2).
BEGIN failed--compilation aborted.
[Info - 7:50:57 AM] Connection to server got closed. Server will restart.
Can't locate Perl/LanguageServer.pm in @INC (you may need to install the Perl::LanguageServer module) (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/vendor_perl/5.38.2/x86_64-linux /usr/lib/perl5/vendor_perl/5.38.2 /usr/lib/perl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2).
BEGIN failed--compilation aborted.
[Info - 7:50:57 AM] Connection to server got closed. Server will restart.
Can't locate Perl/LanguageServer.pm in @INC (you may need to install the Perl::LanguageServer module) (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/vendor_perl/5.38.2/x86_64-linux /usr/lib/perl5/vendor_perl/5.38.2 /usr/lib/perl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2).
BEGIN failed--compilation aborted.
[Info - 7:50:57 AM] Connection to server got closed. Server will restart.
Can't locate Perl/LanguageServer.pm in @INC (you may need to install the Perl::LanguageServer module) (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/vendor_perl/5.38.2/x86_64-linux /usr/lib/perl5/vendor_perl/5.38.2 /usr/lib/perl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2).
BEGIN failed--compilation aborted.
[Info - 7:50:57 AM] Connection to server got closed. Server will restart.
Can't locate Perl/LanguageServer.pm in @INC (you may need to install the Perl::LanguageServer module) (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/x86_64-linux /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/vendor_perl/5.38.2/x86_64-linux /usr/lib/perl5/vendor_perl/5.38.2 /usr/lib/perl5/5.38.2/x86_64-linux /usr/lib/perl5/5.38.2).
BEGIN failed--compilation aborted.
[Error - 7:50:57 AM] Connection to server got closed. Server will not be restarted.
وقتی هم از cpanm استفاده میکنم (مثلا برای DBI ) این خروجی رو میده ولی مثل اینکه واقعا چیزی نصب نمیکنه:!
! Can't write to /usr/share/perl5/site_perl and /usr/bin: Installing modules to /home/learner/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /usr/share/perl5/site_perl and /usr/bin)
! - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
! Finding DBI on cpanmetadb failed.
DBI is up to date. (1.645)
خب توی پرل هم چیزی به نام DBI پیدا نمیکنم. ( مثلا نمیتونم چیزی به نام use DBI به برنامه استفاده کنم. )learner ~ cpan
Loading internal logger. Log::Log4perl recommended for better logging
Terminal does not support AddHistory.
To fix that, maybe try> install Term::ReadLine::Perl
cpan shell -- CPAN exploration and modules installation (v2.36)
Enter 'h' for help.
cpan[1]> install Term::ReadLine::Perl
Reading '/home/learner/.cpan/Metadata'
Warning: Found only 0 objects in /home/learner/.cpan/Metadata
Trying with
/usr/bin/wget -O "/home/learner/.cpan/sources/authors/01mailrc.txt.gz.tmp5759"
to get
https://cpan.org/authors/01mailrc.txt.gz
--2024-09-07 07:58:02-- https://cpan.org/authors/01mailrc.txt.gz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving cpan.org (cpan.org)... 151.101.1.55, 151.101.193.55, 151.101.129.55, ...
Connecting to cpan.org (cpan.org)|151.101.1.55|:443... connected.
use v5.38;
use strict;
use warnings;
use diagnostics;
use Regexp::Debugger;
خروجی : Can't locate Regexp/Debugger.pm in @INC (you may need to install the Regexp::Debugger module) (@INC entries checked: /usr/lib/perl5/5.40/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.40/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.40/core_perl /usr/share/perl5/core_perl) at main.pl line 5.
BEGIN failed--compilation aborted at main.pl line 5 (#1)
(F) You said to do (or require, or use) a file that couldn't be found.
Perl looks for the file in all the locations mentioned in @INC, unless
the file name included the full path to the file. Perhaps you need
to set the PERL5LIB or PERL5OPT environment variable to say where the
extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
"require" in perlfunc and lib.
Uncaught exception from user code:
Can't locate Regexp/Debugger.pm in @INC (you may need to install the Regexp::Debugger module) (@INC entries checked: /usr/lib/perl5/5.40/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.40/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.40/core_perl /usr/share/perl5/core_perl) at main.pl line 5.
BEGIN failed--compilation aborted at main.pl line 5.
$ cat run.pl
#!/usr/bin/perl
#use v5.38;
use strict;
use warnings;
use diagnostics;
use Regexp::Debugger;
use warnings;
print("Hello, World!\n");
$ apt search "Regexp::Debugger"
libregexp-debugger-perl/testing,now 0.002007-1 all [installed]
Perl module to visually debug regexes in-place
$ sudo apt install libregexp-debugger-perl
libregexp-debugger-perl is already the newest version (0.002007-1).
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 444
$ perl run.pl
Hello, World!
cpanp -i Regexp::Debugger
pacman:sudo pacman -S perl-regexp-debugger
یک مشکلی که وجود داره اینه که ادیتور بنده فکر میکنه که نصب نیست و همش ایراد میگیره. درصورتی که برنامه با موفقیت اجرا میشه.