Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Can't locate Apache/DBI.pm in @INC etc/httpd) at (eval 2) line 2.\n

Dear OCS Gurus,

Need your assistance to resolve the issue that I am facing.

Installed OCS Inventory Server for Unix on

CentOS Linux release 7.2.1511 (Core)

Apache

Server version: Apache/2.4.6 (CentOS)
Server built:   Jul 18 2016 15:30:14

PHP

PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Perl

This is perl 5, version 16, subversion 3

MYSQL

mysqld  Ver 5.7.16 for Linux on x86_64 (MySQL Community Server (GPL)).

The installation completed successfully and no errors observed in the installation log. (will append the log at the end).

After installation the httpd server fails to start the following errors are observed in the error_log:

 [Fri Dec 09 12:42:08.186275 2016] [perl:error] [pid 4107] Can't load Perl module Apache::DBI for server ocsinventory-ng.XXX.com:0, exiting...
[Fri Dec 09 13:26:39.109236 2016] [perl:error] [pid 4332] Can't locate Apache/DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at (eval 2) line 2.\n

I have checked and found all the directories and path are in order. The plugin and perl directories are also in order as specified in the z-ocsinventory.conf file. HTTPD fails to start.

The installation log starts here: - (Have curtailed the log. Can provide the log in email)

Starting OCS Inventory NG Management server setup on 2016-12-09-12-39-49
from folder /root/OCSNG_UNIX_SERVER-2.3
Storing log in file /root/OCSNG_UNIX_SERVER-2.3/ocs_server_setup.log

============================================================
Checking OCS Inventory NG Management Server requirements...
============================================================
Checking for database server properties
MySQL client distribution version 5.7.
Computer seems to be running MySQL 4.1 or higher
Database server is running on host localhost
Database server is running on port 3306
Checking for Apache web server daemon
Found Apache daemon /usr/sbin/httpd
Using Apache daemon /usr/sbin/httpd
Checking for Apache main configuration file
Found Apache HTTPD_ROOT /etc/httpd
Found Apache SERVER_CONFIG_FILE conf/httpd.conf
Found Apache main configuration file /etc/httpd/conf/httpd.conf
Using Apache main configuration file /etc/httpd/conf/httpd.conf
Checking for Apache user account
Found Apache user account apache
Using Apache user account apache
Checking for Apache group
Found Apache user group apache
Using Apache user group apache
Checking for Apache Include configuration directory
Found Apache Include configuration directory /etc/httpd/conf.d
Using Apache Include configuration directory /etc/httpd/conf.d
Checking for PERL Interpreter
Found PERL Intrepreter at </usr/bin/perl>
Using PERL Intrepreter /usr/bin/perl

============================================================
Installing Communication server
============================================================
Checking for Make utility
Make utility found at </usr/bin/make>
Checking for Apache mod_perl version 1.99_22 or higher
mod_perl 1.99_22 or higher is available
Using mod_perl version 1.99_22 or higher
Checking for Communication server log directory
Using /var/log/ocsinventory-server as Communication server log directory
Checking for Communication server plugins configuration directory
Using /etc/ocsinventory-server/plugins as Communication server plugins configuration directory
Checking for Communication server perl directory
Using /etc/ocsinventory-server/perl as Communication server plugins perl directory
Entering Apache sub directory
Checking for DBI PERL module
PERL module DBI is available
Checking for Apache::DBI PERL module
PERL module Apache::DBI is available
Checking for DBD::mysql PERL module
PERL module DBD::mysql is available
Checking for Compress::Zlib PERL module
PERL module Compress::Zlib is available
Checking for XML::Simple PERL module
PERL module XML::Simple is available
Checking for Net::IP PERL module
PERL module Net::IP is available
Checking for SOAP::Lite Perl module
PERL module SOAP::Lite is available
Checking for Archive::Zip Perl module
PERL module Archive::Zip is available
Checking for Apache2::SOAP PERL module
PERL module Apache2::SOAP is available
Checking for XML::Entities PERL module
PERL module XML::Entities is available
Configuring Communication server (perl Makefile.PL)
Preparing Communication server Perl modules (make)

################################################################################
# Snmp communities area
#
# Alias to put Snmp custom Mibs files outside Apache document root directory
#
<Directory /var/lib/ocsinventory-reports/snmp>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     Require all granted
   </IfModule>
   <IfModule !mod_authz_core.c>
     Order deny,allow
     Allow from all
   </IfModule>
</Directory>
Alias /snmp /var/lib/ocsinventory-reports/snmp
******** End updated ocsinventory-reports.conf.local ***********
Writing communication server configuration to file /etc/httpd/conf.d/ocsinventory-reports.conf
Administration server installation successful
in OCS Inventory NG server for Unix by (140 points)

1 Answer

0 votes
Hi,

It looks like your setup detected that apache::dbi was installed but it wasn't

Could you install Apache::DBI module and try again ?

Regards,

Gilles Dubois.
by (3.1k points)
 
Powered by Question2Answer
...