I've installed MariaDB (apt install mariadb-server) and that seems to have been successful.
Now I am trying to install DBD::MariaDB using MCPAN. I get:
cpan[1]> install DBD::MariaDB
Reading '/root/.cpan/Metadata'
Database was generated on Wed, 16 Jun 2021 01:29:02 GMT
Running install for module 'DBD::MariaDB'
Checksum for /root/.cpan/sources/authors/id/P/PA/PALI/DBD-MariaDB-1.21.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
Configuring P/PA/PALI/DBD-MariaDB-1.21.tar.gz with Makefile.PL
Cannot find the file 'mariadb_config' nor 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mariadb_config or mysql_config. Resorting to guessed values!
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MariaDB or MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::MariaDB::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
PALI/DBD-MariaDB-1.21.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Failed during this command:
PALI/DBD-MariaDB-1.21.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512
This doesn't seem right. How can I get it to find those config files? "Resorting to guessed values" is not working out. If I try to go to the admin course for example, I get:
error instantiating DB driver WeBWorK::DB::Driver::SQL for table
achievement_user: install_driver(MariaDB) failed: Can't locate
DBD/MariaDB.pm in @INC (you may need to install the DBD::MariaDB module)
(@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.26.1
/usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26
/usr/share/perl/5.26 /usr/local/lib/site_perl /etc/apache2) at (eval
996) line 3.
Perhaps the DBD::MariaDB perl module hasn't been fully installed,
or perhaps the capitalisation of 'MariaDB' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, Sponge,
mysql.
at /opt/webwork/webwork2/lib/WeBWorK/DB/Driver/SQL.pm line 79.
at /opt/webwork/webwork2/lib/WeBWorK.pm line 317.