I'm trying to install a legacy PERL application on my bitnami moodle server. Moodle works file. Trying to get PERL to work with the Bitnami LAMP stack is more problematic.
I got through my first problem by giving up on CPAN and just using apt packages to install the necessary PERL modules using the syntax:
# apt install lib...-perl
(for example, to install the DBD::mysql PERL module, the syntax would be:
# apt install libdbd-mysql-perl
This seemed to get the modules to use the correct ssl libraries for the bitnami stack instead of the default PERL locations.
I now have PERL installed with CGI and DBI packages.
My new hurdle is that the DBI packages don't seem to be connecting to mysql using the standard sockets (possibly another Bitnami issue). For example, a simple code snippet:
say "Perl MYSQL connect demo...";
my $dsn = "DBI:mysql:two47net";
my $username = "two47net";
my $password = '*******';
my %attr = (PrintError=>1, RaiseError=>1);
my $dbh = DBI->connect($dsn,$username,$password, \%attr);
say "Connected to Mysql database";
Errors out reporting:
Perl MYSQL connect demo...
DBI connect('two47net','two47net',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") at dbtest.cgi line 15.
(Line 15 is the assignment to "my $dbh").
It seems that the DBD install doesn't know about Bitnami's mysql and it may be a known issue (see https://stackoverflow.com/questions/54813743/install-drivermysql-failed-cant-locate-dbd-mysql-pm)