configure: error: installation or configuration problem: C compiler cannot create executables.

2019 Macbook M1 Sonoma 14.5.

Installed Perlbrew and Perl-5.38.2. Tried to install Perl Tk using cpanm. inline-code checking for gcc... cc checking whether the C compiler (cc -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -mmacosx-version-min=14.5 -fstack-protector-strong -L/usr/local/lib) works... no configure: error: installation or configuration problem: C compiler cannot create executables. ERROR from evaluation of /Users/terryhimes/.cpanm/work/1718338769.22397/Tk-804.036/JPEG/Makefile.PL: ERROR from evaluation of /Users/terryhimes/.cpanm/work/1718338769.22397/Tk-804.036/JPEG/jpeg/Makefile.PL: Error opening Makefile: No such file or directory at ./Makefile.PL line 41. inline-code

configure: error: installation or configuration problem: C compiler cannot create executables.
 
 
Q