Error while starting Apache - perl

I am getting following error while starting apache.
Can't locate /usr/sbin/webmux.pl in #INC (#INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 2) line 1.\n
Can't load Perl file: /usr/sbin/webmux.pl for server 127.0.0.1:0, exiting...
Can anyone please suggest me what i am missing ?
mod_perl-2.0.4

So, it looks like webmux.pl needs the mysql daemon started first. I found the error message in /var/log/httpd/error_log. Start mysqld first and then the web server will start

Search your Apache config files for webmux.pl. Something must be trying to load it. Either remove the reference to it, or install it.

Found this in RT configs. After comment it, things are working now.

Error:
[root#localhost conf]# service httpd restart
Deteniendo httpd: [FALLÓ]
Iniciando httpd: [FALLÓ]
[root#localhost conf]#
Log:
[error] Can't load Perl file: /usr/sbin/webmux.pl for server localhost.localdomain:0, exiting...
DBI connect('dbname=rt3;host=localhost','rt_user',...) failed: Access denied for user 'rt_user'#'localhost' (using password: YES) at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 106
Solution:
[root#localhost conf]# mkdir /root/backup/httpd/ -p
[root#localhost conf]# mv /etc/httpd/conf.d/rt3.conf /root/backup/httpd/
[root#localhost conf]# service httpd restart
Deteniendo httpd: [ OK ]
Iniciando httpd: [ OK ]
[root#localhost conf]#

here is what i found on http://wiki.bestpractical.com/view/Troubleshooting
Can't locate Apache/Response.pm in #INC ...
Can't load Perl file: bin/webmux.pl for server localhost:0, exiting...
Found this issue in Aurora SPARC Linux 2.0 (Fedora Core 3 for SPARC)
when trying to install...
turns out that after installing all the modules for rt,
I still had an ancient verion of CGI.pm,
which was not intended to correctly detect the mod_perl2 modules vs.
regular mod_perl. Upgrading CGI via CPAN quickly resolved this problem after an
embarrassing number of hours troubleshooting.
If Apache refuses to start after you add PerlRequire bin/webmux.pl to your
config and you're sure you've got a valid mod_perl2 installation,
try upgrading CGI to the latest version.
maybe you can try first to update your CGI.pm module.
Did you find your call to webmux.pl in your apache conf ?
old previous useless response :
well, can you post the code from the script that tries to launch webmux.pl ?
but i would suggest a simple solution, if you don't have administrative rights or don't want
to go further in your perl conf :
add at top of your code (but below use strict...never forget this one)
in your script the code :
use lib "/usr/sbin/"
so you script will be able to use libraries located in /usr/sbin/

Related

How to debug program compilation when Perl module fails

I'm trying to compile Slic3r 1.2.9 (Git 65a23b) on Raspbian, and running sudo perl Build.PL --verbose fails while building the Perl module Time-HiRes-1.9754:
...
--> Working on Time::HiRes
Fetching http://www.cpan.org/authors/id/J/JH/JHI/Time-HiRes-1.9754.tar.gz ... OK
Configuring Time-HiRes-1.9754 ... FAIL
! Timed out (> 60s). Use --verbose to retry.
! Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520227993.988/build.log for details.
The log file shows a little more information, but I've never worked with Perl and I don't know where to start debugging:
$ tail /root/.cpanm/work/1520234788.2186/build.log
Looking for clock_getres()... found.
Looking for clock_nanosleep()... found.
Looking for clock()... found.
Looking for working futimens()... found.
Looking for working utimensat()... found.
You seem to have subsecond timestamp setting.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
-> FAIL Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520234788.2186/build.log for details.
I've posted an issue with Slic3r on GitHub, but I haven't had any suggestions yet - presumably it's not actually a problem with Slic3r itself.
What should I do next to work out what's going wrong?

DBD::Sybase error

First of all, let me thank you for your time and knowledge sharing, I'm kind of an ignorant in trems of perl modules
I have a 64bit ubuntu Server 12.04, with Perl version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi and CPAN exploration and modules installation (v2.10).
I'm trying to use a perl script accessing a Microsoft SQL Server and I'm having a really hard time upon the DBD::Sybase module
When I try to install DBD::Sybase CPAN tells me it's already installed:
cpan[1]> install DBD::Sybase
Reading '/root/.cpan/Metadata'
Database was generated on Wed, 29 Apr 2015 14:53:21 GMT
DBD::Sybase is up to date (1.15).
I also find multiple Sybase.pm files on my filesystem, some of them are under Perl path
root#server:# find /* -name Sybase.pm
/home/usriten/download/DBD-Sybase-1.15/Sybase.pm
/root/.cpan/build/DBD-Sybase-1.15-TtUI0T/Sybase.pm
/root/.cpan/build/DBD-Sybase-1.15-kNqdf7/Sybase.pm
/root/.cpan/build/DBD-Sybase-1.15-rZgcTa/Sybase.pm
/usr/local/lib/perl/5.14.2/Sybase.pm
/usr/local/lib/perl/5.14.2/DBD/Sybase.pm
/usr/local/lib/perl/5.14.2/DBI/Sybase.pm
But when I try to run my script it returns an error on a line that calls 'if ($self->{handle} = DBI->connect('
# ./check_mssql_health --hostname <MSSQL_Server_IP> --username <SQL_User> --password <Pass> --mode connection-time
mode connection-time
CRITICAL - cannot connect to <MSSQL_Server_IP>. install_driver(Sybase) failed: Can't locate loadable object for module DBD::Sybase in #INC (#INC contains: . /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl) at (eval 10) line 3
Compilation failed in require at (eval 10) line 3.
Perhaps a module that DBD::Sybase requires hasn't been fully installed
at ./check_mssql_health line 3192
I've already spent a lot of time scavenging posts but I did not find a solution or at least one I could understand and Implement.
Best regards, Sebastião
When I try to install DBD::Sybase CPAN tells me it's already installed:
That simply means it found a DBD/Sybase.pm. No tests are performed; the module isn't even loaded.
In an act of desperation I've copied the Sybase.pm to the DBD/
That's the cause of the error you're asking about. Perl is finding the .pm you copied over, but not the other files created as part of the installation process.
Delete the files you created[1], then install the module properly (e.g. using your system's package manager if it has one, or cpan DBD::Sybase if it doesn't).
You appear to have created at least the following files:
/usr/local/lib/perl/5.14.2/Sybase.pm
/usr/local/lib/perl/5.14.2/DBD/Sybase.pm
/usr/local/lib/perl/5.14.2/DBI/Sybase.pm
I got it working with a different setup.
Don't use DBD::Sybase, but install freetds, unixodbc, and then DBD::ODBC. In the freetds.conf file set the appropriate parameters. Mine looks like this
[myMSSL]
host = 111.22.33.44
port = 1433
tds version = 7.2
client charset = UTF-8
and /etc/odbc.ini
[mySQSL_mydb]
APP = unixodbc
Description = Database mydb on myMSSQL
Driver = TDSdriver
Server = myhost
Database = mydb
Port = 1433
#Trace = No
I think these are the packages that you need.
libdbd-freetds - Freetds database server driver for libdbi
tdsodbc -ODBC driver for connecting to MS SQL and Sybase SQL servers
freetds-bin - FreeTDS command-line utiliti
ALternatively, see also this post:
Using Ubuntu, how do I install DBD::Sybase from CPAN?
(and some others, e.g this one: Access SQL Server from Solaris)
I would try and install it via apt
sudo apt-get install libdbd-sybase-perl -y
I've found CPAN to sometimes miss dependencies.

trouble installing MozRepl

I've been trying to install WWW::Mechanize::Firefox through CPAN and I am having trouble installing the dependency MozRepl. The installation goes through but the tests all fail, and when I force install it and run my perl script, I run into an error
Failed to connect to , at /Library/Perl/5.12/MozRepl/RemoteObject.pm line 467.
SO I uninstalled MozRepl and looked at the tests I get the following errors in the log:
# Failed test at t/10-plugin-repl-enter.t line 11.
Can't locate object method "repl_enter" via package "MozRepl" at t/10-plugin-repl-enter.t line 12.
...
# Failed test at t/20-plugin-json.t line 16.
Can't locate object method "json" via package "MozRepl" at t/20-plugin-json.t line 17.
# Failed test at t/19-plugin-repl-util-doc_for.t line 14.
Can't locate object method "repl_doc_for" via package "MozRepl" at t/19-plugin-repl-util-doc_for.t line 16.
# Failed test at t/18-plugin-repl-util-help_url_for.t line 14.
Can't locate object method "repl_help_url" via package "MozRepl" at t/18-plugin-repl-util-help_url_for.t line 16.
etc..
I am running on Mac OSX 10.8.4, 4 GB Ram 2.5 Ghz, Perl version 5.12. Does anybody have any idea what is causing these errors?
UPDATE:
i reinstalled mozrepl, and now I get this error when i run my script:
Failed to connect to , problem connecting to "localhost", port 4242: Connection refused at /Users/thui/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/MozRepl/Client.pm line 144
This works for me with perl 5.10 or later, latest Firefox (26 as of writing) and Mozrepl from github.
At command propmpt:
(1) Download MozRepl and build the XPI file (Firefox extension):
git clone git://github.com/bard/mozrepl
cd mozrepl
zip -r ../mozrepl.zip *
cd ..
mv mozrepl.zip mozrepl.xpi
(2) Install the extension in Firefox via about:addons [Install from file].
In Firefox:
(3) Menu->Tools->Mozrepl->Activate On Startup
(4) Menu->Tools->Mozrepl->Start
At command propmpt:
(5) which firefox
Make sure the firefox executable (or your OS's wrapper script) is in $PATH - you should get some output!
(6) cpanm WWW::Mechanize::Firefox
(7) Test it!
At this point, if CPANminus reports no errors then WWW::Mechanize::Firefox should be working. The first example from the synopsis is a good test:
#!/usr/bin/perl
use WWW::Mechanize::Firefox;
my $mech = WWW::Mechanize::Firefox->new();
$mech->get('http://google.com');
That assumes MozRepl is listening on port 4242 (check in Menu->Tools->Mozrepl->Change Port). You can also change the port from the perl side; see options for ->new().
(8) cpanm HTML::Display::Common
I found that bcat.pl from the examples required this module, but it wasn't installed as a dependency.

Perl cpan: error installing DateTime, CHECKSUM download failure

I am running Perl 5.10 on a shared Red Hat Linux 6.2 server. I have asked the root user of the machine to install the Perl DateTime module for me, using the following commands:
perl -MCPAN -e shell
cpan> install DateTime
We were able to successfully install other Perl modules such as Text::CSV before.
But the following error occurred while installing DateTime. Here is the last bits of error log:
Question: It looks like the error might be complaining about not being able to fetch the CHECKSUM file from ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS. However, I have no problem browsing to this exact file from my Internet Explorer. Can someone suggest ways to workaround this? Thanks.
Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173" to get
"ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
--2013-06-20 09:30:06-- ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
=> b/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173b
Resolving ftp.perl.org... 203.178.137.175, 163.143.1.21 Connecting to ftp.perl.org|203.178.137.175|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/CPAN/authors/id/R/RJ/RJBS ... done.
==> SIZE CHECKSUMS.gz ... done.
==> PASV ... done. ==> RETR CHECKSUMS.gz ...
No such file bCHECKSUMS.gzb.
Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311
As a last resort we now switch to the external ftp command '/usr/kerberos/bin/ftp'
to get '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'.
Doing so often leads to problems that are hard to diagnose.
If you're the victim of such problems, please consider unsetting the ftp config variable with
o conf ftp ""
o conf commit
Issuing "/usr/kerberos/bin/ftp -n"
Trying with external ftp to get
ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
Going to send the dialog
open ftp.perl.org
user anonymous Red Hat, Inc.#localhost.localdomain
lcd /root/.cpan/sources/authors/id/R/RJ/RJBS
cd /
cd pub
cd CPAN
cd authors
cd id
cd R
cd RJ
cd RJBS
bin
get CHECKSUMS CHECKSUMS.tmp12173
quit
Not connected.
Local directory now /root/.cpan/sources/authors/id/R/RJ/RJBS
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'
Could not fetch authors/id/R/RJ/RJBS/CHECKSUMS
UPDATE1:
We also tried the o conf ftp "" and o conf commit commands, but we still had an error.
Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529" to get
"http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
--2013-06-20 13:52:07-- http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
Resolving www.perl.org... 207.171.7.41, 207.171.7.51 Connecting to www.perl.org|207.171.7.41|:80... failed: Connection refused.
Connecting to www.perl.org|207.171.7.51|:80... failed: Connection refused.
Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/R/RJ/RJBS/Test-Fatal-0.010.tar.gz ok Test-Fatal-0.010 Test-Fatal-0.010/README Test-Fatal-0.010/Changes Test-Fatal-0.010/LICENSE Test-Fatal-0.010/dist.ini Test-Fatal-0.010/META.yml Test-Fatal-0.010/MANIFEST Test-Fatal-0.010/t Test-Fatal-0.010/t/basic.t Test-Fatal-0.010/META.json Test-Fatal-0.010/Makefile.PL Test-Fatal-0.010/lib/Test Test-Fatal-0.010/lib/Test/Fatal.pm
Test-Fatal-0.010/t/like-exception.t
Test-Fatal-0.010/t/release-pod-syntax.t
CPAN.pm: Going to build R/RJ/RJBS/Test-Fatal-0.010.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite Try::Tiny 0.07 not found.
Writing Makefile for Test::Fatal
Could not read '/root/.cpan/build/Test-Fatal-0.010-GNYnPy/META.yml'. Falling back to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
---- RJBS/Test-Fatal-0.010.tar.gz ----
Try::Tiny [requires]
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Try::Tiny'
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for D/DO/DOY/Try-Tiny-0.12.tar.gz Fetching with LWP:
http://www.perl.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[Can't connect to www.perl.org:80 (connect: Connection refused)] Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[]
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
Catching error: "Timeout at /usr/share/perl5/Net/FTP.pm line 491\cJ" at /usr/share/perl5/CPAN.pm line 391
CPAN::shell() called at -e line 1
did you do what it suggested?
If you're the victim of such problems, please consider unsetting the ftp config variable with
o conf ftp ""
o conf commit
Alternatively, you can download the module as a gz file from the cpan site
uncompress it cd to the directory
do
perl Build.PL
./Build install
or
perl Makefile.PL
make install
accordingly.
This is all that cpan will be doing so you will see if you're missing any packages or modules
incidentally, you don't need to be root if you are happy to install your modules somewhere else. There are plenty of examples to achieve this

Perl module broke my windows xampp installation

PROBLEM: In the process of trying to install gitstat on a Windows7 machine I broke my xampp Apache installation. Now I can't get gitstat or apache to work.
APACHE ERROR:
[error] Can't load Perl file: C:/xampp/apache/conf/extra/startup.pl for server localhost:80, exiting...`
Other people have reported this issue being caused by the PERL5LIB environment variable, but that variable does not exist on my machine.
WHAT I DID / GITSTAT ERROR:
I needed the SOAP::Lite module installed so I followed the windows guide here: http://soaplite.com/install.html
As far as I could tell I installed the module successfully, console output below
cpan[1]> install SOAP::Lite
CPAN: Storable loaded ok (v2.21)
Going to read '\xampp\perl\bin\.cpan\Metadata'
Database was generated on Wed, 27 Jun 2012 02:47:03 GMT
SOAP::Lite is up to date (0.714).
I saw a SOAP directory in perl/site/lib which (to me) means that the module should be available. When I look in my perllocal.pod file SOAP:Lite is in there.
Part of the gitstat installation instructions say to copy the Lite.pm file from perl/site/lib/SOAP into gitstat\gstat_pl\lib
However, when I try to perform step nine of gitstat installation (perl gitstat.pl HEAD) I get the following:
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Supported versions:
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Lite.pm line 34
86.
Compilation failed in require at C:/xampp/perl/site/lib/SOAP/Constants.pm line 1
3.
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Constants.pm li
ne 13.
Compilation failed in require at lib/Lite.pm line 3444.
BEGIN failed--compilation aborted at lib/Lite.pm line 3444.
Compilation failed in require at gitstat.pl line 30.
If I don't copy the file from perl/site/lib/SOAP then I get
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Can't locate lib/Lite.pm in #INC (#INC contains: C:/xampp/perl/lib C:/xampp/perl
/site/lib .) at gitstat.pl line 30.
I don't understand why CPAN didn't install the Lite.pm module in the #INC path or why the compilation might fail when the module is available, or most importantly why my Apache install is broken. Also I'm very new to Perl and CPAN and my understanding of Apache is primitive so simpler explanations would be greatly appreciated.