Issues with installing EPrints on RHEL / CentOS / Rocky 9

From EPrints Documentation
Jump to: navigation, search

epel-release package not available

Some installations of RHEL 9 may not show epel-release as a package available for installation. If this is the case, you will need to install this package directly from dl.fedoraproject.org:

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

elinks package is no longer available

The RPM package elinks is no longer available in RHEL / CentOS / Rocky 9 even with EPEL package repository. elinks is only needed if are intending to upload web pages or XML files and these need to be indexed by EPrints, so if installing from source use the following DNF command line:

dnf install libxml2 libxslt httpd mod_perl perl-DBI perl-DBD-MySQL perl-IO-Socket-SSL perl-Time-HiRes \
   perl-CGI perl-Digest-MD5 perl-Digest-SHA perl-JSON perl-XML-LibXML perl-XML-LibXSLT perl-XML-SAX \
   perl-MIME-Lite perl-Text-Unidecode perl-JSON perl-Unicode-Collate tetex-latex wget gzip tar \
   ImageMagick poppler-utils chkconfig unzip cpan python3-html2text

In future versions of EPrints (3.4.5+) EPrints will be switching to use html2text rather than elinks. changeset shows how the places where elinks is used can be changed to switch over to using html2text. To make use of this you will need to add python3-html2text to the DNF command above.

perl-IO-String package is no longer available

The RPM package perl-IO-String is no longer available in RHEL / CentOS / Rocky 9 even with EPEL package repository. You can enable the Code Ready Builder repository, which still has perl-IO-String available:

subscription-manager repos --enable "codeready-builder-for-rhel-9-$(arch)-rpms"

If you are running CentOS 9 (or Rocky 9) you can similarly enable the crb repository:

dnf config-manager --set-enabled crb

Then install perl-IO-String:

dnf install perl-IO-String

Sub-dependency packages perl-MIME-Types and perl-Digest-SHA1 are no longer available

perl-MIME-Lite package requires perl-MIME-Types package and perl-Apache-DBI requires perl-Digest-SHA1 package neither of which available on RHEL / CentOS / Rocky 9, even with EPEL repository enabled. You can enable the Code Ready Builder repository, which still has these packages available:

subscription-manager repos --enable "codeready-builder-for-rhel-9-$(arch)-rpms"

If you are running CentOS 9 (or Rocky 9) you can similarly enable the crb repository:

dnf config-manager --set-enabled crb

Then install perl-MIME-Types and perl-Digest-SHA1:

dnf install perl-MIME-Types perl-Digest-SHA1

perl-Apache-DBI and Pod::LaTeX packages is no longer available

The RPM packages perl-Apache-DBI are no longer available in RHEL / CentOS / Rocky 9 even with EPEL or Code Ready Builder package repository. You can install this using CPAN instead:

cpan Apache::DBI
cpan Pod::LaTeX

Compatibility issues with XML::LibXSLT

Installing XML::LibXSLT either through the perl-XML-LibXSLT RPM or CPAN causes httpd to generate a segmentation fault and core dump when you try to start it. The most straightfarward solution to this is to run httpd in mpm-prefork rather than mpm-event mode. This can be acheived by editing /etc/httpd/conf.modules.d/00-mpm.conf and commenting out the following line:

LoadModule mpm_event_module modules/mod_mpm_event.so

and uncommenting the mpm-prefork line:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

The alternative solution is to make sure that XML::LibXSLT is not installed through the perl-XML-LibXSLT RPM or CPAN. EPrints will still run without this but you will not be able to use XSLT-based import plugins. Unless you have installed any additional import plugins, the only ones affected are Atom XML and OpenXML Bibliography.

MySQL root user cannot be used

On RHEL/Centos/Rocky Linux 9 rather than prompting you to set a password for MySQL server when installing this as a dependency, it just installs it without. However, this means on the root user can login to MySQL to add a database. As "epadmin create" runs at the eprints user, this will not be able to create a database for EPrints. To get round this as the root user connect to MySQL (just type "mysql" at the command line) and type the following two commands. You will want to set your own password (i.e. not 'changeme') , you may also want to restrict which databases the eprints user has control over. If you know the "Archive ID" you are going to use.

CREATE USER 'eprints'@'localhost' IDENTIFIED by 'changeme';
GRANT ALL PRIVILEGES ON *.* TO 'eprints'@'localhost' WITH GRANT OPTION;