I got the following errors while installind Tk module from perl in MacOS catalina 10.15.6
cpan install Tk
And the error I get
Cannot find '/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/perl.h' have you installed /usr/bin/perl?
Compilation failed in require at Makefile.PL line 37.
BEGIN failed--compilation aborted at Makefile.PL line 39.
Warning: No success on command[/usr/bin/perl Makefile.PL]
SREZIC/Tk-804.035.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Could you please help me know what's happening here?
perl.his located in an unexpected place. On my mac (10.15.5) I have system perl version 5.18 andperl -MConfig -E'system "ls $Config{archlib}/CORE"'shows only a single filelibperl.dylib(usuallyperl.his located here). However,perl.hexists in here/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/COREinstead but Tk cannot find it since it is not in the usual placeperl -MConfig -E'say $Config{archlib}'shows/System/Library/Perl/5.18/darwin-thread-multi-2levelmyConfigwhich checks forperl.hin$Config{archlibexp}see line 3. Maybe the easiest solution would be to useperlbrew, then you would get all the headers in the right place ?