I am using a MacBook 14.1.1 Sonoma M2 chip and want my Perl scripts to talk to my MariaDB database. Installing DBI was no problem. However when trying to install DBD::MariaDB I get the following error:
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- MariaDB.bs blib/arch/auto/DBD/MariaDB/MariaDB.bs 644 make: *** No rule to make target /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/auto/DBI/Driver_xst.h', needed by MariaDB.xsi'. Stop. PALI/DBD-MariaDB-1.23.tar.gz /usr/bin/make -- NOT OK Failed during this command: PALI/DBD-MariaDB-1.23.tar.gz : make NO
Does anyone know what the problem is here? The same error is happening when I was trying to download DBD:Pg
The Perl installed with MacOS is not a complete development environment. It is missing things such as header files necessary to compile other modules. You can get these as part of the XCode Command Line Tools, but there's some additional configuration necessary to actually use them.
It's better to leave the system Perl alone. Consider it part of the operating system. Any modules you install or upgrade may break parts of the OS, or be overwritten on the next OS update.
Instead, install your own Perl for development. You can do this with a package manager such as Homebrew, generally very handy, or if you want more control use Perl's own perlbrew.