Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [perl]

Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The CPAN is Perl's module repository and is where users should turn first for code that implements solutions to already-solved problems.

0
votes
0answers
12 views

How to reinstall/fix specific perl module on ubuntu 16.04

During an update, apt and dkpg returned the following error: dpkg: error processing package libperl5.22:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it ...
-1
votes
0answers
9 views

Linux Perl SFTP download folder

I try to download a folder from sftp folder here my script #!/usr/bin/perl -w use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign->new('user_sftp@server'); $sftp->die_on_error("SSH ...
2
votes
1answer
27 views

Binaries generated by perl's PAR::Packer break when packaged in RPM

I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work ...
0
votes
0answers
34 views

Upgrade OTRS 6.0 - /opt/otrs/bin/c CPU usage

OTRS 6.0 - /opt/otrs/bin/c CPU usage Hi everyone, On OTRS 6.0, the /opt/otrs/bin/c processus use 100% when login to otrs/index.pl : 3104 apache 20 0 441496 79904 6308 R 100.0 0.2 0:06....
0
votes
0answers
14 views

Running processes: “perl /tmp/dd” - what is this? [duplicate]

I have a LAMP server with about 50 virtual domains, and am using Webmin/Virtualmin to manage the server. When looking at running processes (top) I see one domain's username is running a couple of ...
2
votes
1answer
112 views

WWW::Mechanize Perl module won't install on server

I'm trying to work out why a Perl module won't install on my server. cpanm WWW::Mechanize It processes stuff for ages, and then eventually dies with: root@admin:~# cpanm WWW::Mechanize --> ...
2
votes
1answer
33 views

Checking the validity of Resource Records in DNS Zones

I am using perl to do some DNS manipulation tasks. I am using NSD as my DNS server. I want to figure out what the best way is to check whether the names of all Resource Records in a DNS zone file ...
2
votes
1answer
119 views

Systemd service file for assp

I'm running ASSP on CentOS 7 which uses systemd. The only pre-made service file I could find (howtoforge.com) uses oneshot type which I'm not sure is right. More importantly, the stop command seems ...
1
vote
0answers
49 views

How to distribure sudoers files with REX Configuration Management

When trying to push a sudoers file to other machines, the rexcm task/command gets stuck. The Problem is (so it seems to me), that the sudoers file is owned by the rex-user when writing and "other" ...
1
vote
1answer
54 views

How to backup a file before changing it with “REX Configuration management” (rexify)

How do I backup files when making a change with rex cm (rexify.org) - or do I have to do this manually? I see no option in the File.pm API - description. I hope there is some undocumented feature. ...
0
votes
1answer
276 views

Connection Error with TCP sockets between a Windows 2012 R2 and Linux Centos7

I have a connection problem with TCP sockets between a Windows 2012 R2 machine and Linux CentOS7. When I run a perl client that sends several messages from Linux to a Windows perl service, it allways ...
1
vote
0answers
86 views

Apache mod_ext_filter and mod_proxy

I have a problem using apache mod_ext_filter and mod_proxy. I wrote a per script (add-promo.pl) in order to add some tags to HTML page. My problem is that Apache don't run this script. I have ...
0
votes
0answers
435 views

Perl cgi script displayed as plain text instead of executing

After reading and trying suggestions from: here and here, I am still unable to get apache to execute the perl script. I am on macOS High Sierra and running brew apache. The script works fine if I ...
1
vote
1answer
219 views

pg_upgradecluster fails with “Error: could not get cluster locales”

I'm trying to upgrade postgres cluster from 9.5 to 10 Steps I did: installed postgresql-10 and postgresql-client-10 removed new default 10 main cluster used command "pg_upgradecluster 9.5 main" ...
0
votes
0answers
157 views

smokeping, mod_proxy_fcgi and CentOS 7

Trying to configure smokeping on a CentOS 7 box that already uses httpd24 Apache web server. All the docs about smokeping say to use mod_fcgi, but my httpd24 setup doesn't have that mod anymore and ...
0
votes
1answer
52 views

different permissions running script from web browser or www-data user

I want a perl to write to my server's file system but I have a problem. It fails when checking permissions (with -w). I reduced the issue to its simplest expression : #!/usr/bin/perl print "Content-...
0
votes
1answer
106 views

Bash Script to Rebuild Nginx w/ Custom Modules

I'm trying to write a script that will build Nginx from sources with custom modules... I'd like to do it in a clean manner that doesn't require updating version numbers after a new release. What I've ...
-1
votes
1answer
390 views

SMTP error 554 5.7.1 and 221 2.7.0

I have a dedicated server that connects to a webhosting to send a mails using SMTP protocol, but I get 554 5.7.1 and 221 2.7.0 errors and e-mail won't send. Full SMTP log is below. This is a script ...
0
votes
1answer
189 views

Perl can't find Multicast.pm [duplicate]

[root@newserver Socket]# /root/scripts/filetest testfile.txt Can't locate loadable object for module IO::Socket::Multicast in @INC (@INC contains: /usr/local/lib64/perl5/IO/Socket /usr/local/lib64/...
0
votes
1answer
204 views

How to parse an ldif export for attribute values

I have an ldif export where I want to build an outputfile with one line per ldif entry; the one line contains various attribute-values in a specific order. So the commands should parse each ldif ...
0
votes
1answer
45 views

nph script corrupted in browser with apache2 v 2.4

I'm trying to figure out why an nph- script in Perl is corrupting from the browser. This is the code: #!/usr/bin/perl print "Content-Type: text/plain\n\n"; print "FOO"; I name it nph-test.cgi, and ...
0
votes
0answers
121 views

Nginx is not serving Perl files

I am running Nginx server on Debian 9. My problem is that, Nginx is serving Perl files in root directory, but it is not serving in alias directory (I get 403 Forbidden). This is my configuration of ...
2
votes
1answer
129 views

Multi-line PCRE w\ lookhead, count matches

I am trying to perform a regex that matches if both the word cat AND dog are in the regex with multi-line support matches cat asdjfaldsfj dog #### does NOT match cat adfasdf8989 #### matches dog ...
2
votes
1answer
172 views

Custom prompt using Net::Appliance::Session

I am trying to ssh into a Cisco switch using the Perl module Net::Appliance::Session but I am running into an issue due to the nature of the expected prompt. The switch prompt is the following ...
2
votes
1answer
350 views

AWStats not showing anymore Referrers / Keywords /keyphrases

Me and my colleagues are struggling to find a solution over a strange problem with AWStats. Some months ago, we moved a production environment from a CentOS to an Ubuntu 14.04. Since then, the ...
0
votes
0answers
60 views

PATH_INFO missing on nginx + apache2 proxy pass setup

I'm trying to work out why $ENV{PATH_INFO} is empty in a Perl script on my new server. This is my nginx configuration: location ~ \.cgi$ { try_files $uri =404; gzip off; ...
0
votes
2answers
248 views

How to insert a complex line between two single quotes in sed?

I have this line in the file /var/lib/pgsql/data/postgresql.conf: # archive_command = '' # command to use to archive a logfile segment we need to uncomment the archive_command parameter, ...
1
vote
1answer
683 views

Installing XML::Parser, but it dies due to Expat dependency

I'm trying to install XML::Parser, but for some reason it's failing: cpanm (App::cpanminus) 1.7040 on perl 5.022001 built for x86_64-linux-gnu-thread-multi Work directory is /root/.cpanm/work/...
0
votes
2answers
299 views

Piping exim email to Perl script

I've been trying to pipe an incoming email to a perl script so that I can monitor potential issues with invoices being emailed, and am not having much luck. Working on Red Hat Linux 2.6.32-696-6.3.el6....
0
votes
1answer
271 views

Argument list too long with grep

Normally to search and replace a string in a selection of files, I would find with: grep -rl 'pattern' . This works fine unless you have a LOT of matches. Anyway, I was looking around and found a ...
0
votes
1answer
23 views

command line perl to not clobber symbol links

I want to edit the original files with perl, when I have a numeric sequence of aliases. The task is to use perl on the command line, e.g. perl -pe 's/apples/oranges/' But to edit files in place: ...
1
vote
2answers
147 views

Apache security hosting perl based backuppc graph missing in web GUI, which one is the best solution?

System: fresh and updated ubuntu Xenial Xerus 16.04.2. Started from a clean minimal system where only openssh was installed. In order to install backuppc 3.3.2 i did the following: apt-get install ...
4
votes
3answers
10k views

500 internal server - AH02429: Response header name

OS Ubuntu Ubuntu 16.04.2 LTS Apache/2.4.18 Perl v5.22.1 So I have perl code that reads a mysql database, and then creates a dynamic webpage. The code's been working great for years. A week ago, my ...
2
votes
1answer
879 views

Can't install WWW:Curl on new Ubuntu 16.04 server

I'm trying to work out why I can't install WWW::Curl on my new server. I've done: apt-get install libcurl4-openssl-dev ...and then: cpanm WWW::Curl I then get an error after a while. The log looks ...
1
vote
1answer
118 views

Spamassasin not checking SPF - Perl error?

Getting lots of email spoofing spam from our own domains to my Webmin installation using Spamassasin, the error im receiving when debugging spam is as follows: May 19 09:33:45.959 [15233] dbg: spf: ...
1
vote
1answer
264 views

403 forbidden error when filename contains “pm” on it

I have a server running apache with perl scripts, some pdfs are generated with randomly generated filenames, today we ran into a problem where the filename was ...
1
vote
0answers
636 views

nginx proxy_pass, corrupting pdf file when passed back?

I have a really annoying issue, whereas PDF's I'm trying to download from the site get corrupt. They are generated fine (I can see that if I download it via SFTP from the temp folder they are put in). ...
0
votes
1answer
864 views

Can't install Image::Magick, even though Image Magick is installed

I'm trying to work out why Image::Magick won't install. I've tried loads of things, but it still fatals: perl -MCPAN -e 'install Image::Magick' ...and it dies with: Reading '/root/.cpan/sources/...
0
votes
1answer
655 views

OTRS Installation on AWS Linux AMI results in 500 Internal Server Error page

I am creating a new instance of OTRS on Amazon Linux AMI 2017.03.0 (HVM) and cannot get the installer.pl to run. My installation steps are as follows (and I've done this about four times so far): Set ...
0
votes
1answer
1k views

Installing GD Perl module on Ubuntu 16

I'm trying to get the GD.pm Perl module installed on my server. I get this error when trying to install with cpanm: Please install libgd 2.0.28 or higher. I did some research, and people suggest ...
1
vote
1answer
224 views

nginx + apache2 proxy pass, with mod_perl not working

I'm trying to get mod_perl working on Apache/2.4.18 (Ubuntu). Here is my main domain config file in Apache2: <Virtualhost 0.0.0.0:8181> ServerName test DocumentRoot /srv/www/test.pro/...
-2
votes
1answer
1k views

Killing a Perl process in Linux

I started a perl process that runs a script and I want to end it, but not the rest of perl scripts. How do I target it and not the rest?
1
vote
1answer
181 views

Apache - mod_perl : Unknown Authz provider 'access'

I am trying to set up and run an old Web application(written in 2010) in a new Linux environment. The Apache server is not starting because of the error Unknown Authz provider access, caused by the ...
0
votes
1answer
433 views

Cannot run perl script with sudo

I have a perl script (test.pl). If I run this cript by command perl test.pl, it work as normal. However, when I run command sudo perl test.pl, the error below occurs: Can't locate Log/Log4perl.pm ...
0
votes
0answers
650 views

Cannot install Perl GD module on CentOS

# cpan install GD ... GD-2.56/lib/GD/Polyline.pm CPAN: YAML loaded ok (v0.90) CPAN: CPAN::Meta::Requirements loaded ok (v2.131) CPAN: Parse::CPAN::Meta loaded ok (v1.4414) CPAN: CPAN::Meta loaded ok (...
0
votes
2answers
852 views

check_vmware_api.pl can't be launched

I'm trying to use the script check_vmware_api to get informations of my esxi but I get the following error: [root@centreon plugins]# ./check_vmware_api.pl Can't locate Monitoring/Plugin/Functions....
0
votes
2answers
774 views

CGI errors (Can't open perl script / Permission denied)

OS: CentOS 7 / Apache: 2.4 I'm upgrading machines and software, part of which has involved upgrading from Apache 2.2.x to Apache 2.4.x. A good portion of it works okay, inlcuding PHP scripts, and ...
0
votes
1answer
308 views

Linux “iostat” to .csv file using Perl

I am experimenting with the iostat -c 1 command, and I was wondering if there is a simple way of reading the current output and then separating the values so that I could generate a .csv file. The ...
2
votes
1answer
532 views

How to do an unattended / silent CPAN install / setup

Is there a simple, backward-compatible way to install a Perl module silently using CPAN? PERL_MM_USE_DEFAULT doesn't work for older versions that don't detect a default continent; CPAN will just loop ...
0
votes
1answer
453 views

Setting locale permanently fails on VPS machine Ubuntu server 16.04

I tried everything that I could find, including dpkg-reconfigure locale, reinstalling packages completely, adding LC_ALL and other settings to etc/environment, tried adding to /etc/locale.conf , to ....