Search code examples
macosperlcpangetoptscpanm

Which module do I need when I got error info "Can't locate getopts.pl in @INC..."


I run this command in my macOS

$ perl ~/Desktop/blif2cnf.pl

and got this error info:

Can't locate getopts.pl in @INC (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/Frank/Desktop/blif2cnf.pl line 10.

In my linux 16.04, such problem can be solved by following this answer

Is there a module like libperl4-corelibs-perl in macOS?

I know CPAN, but I don't know which module should I install.


Solution

  • It's Perl4::CoreLibs. In general the Debian package libthis-that-perl corresponds to a module named This::That, although it's up to you to figure out the capitalization :)