0

I've been working on a wakeonlan script, which worked fine, until now.

Then program wakeonlan, which is not made by me, isn't functioning properly.

When I use perl -w /usr/bin/wakeonlan I get this as output:

Getopt/Std.pm did not return a true value at /usr/bin/wakeonlan line 10.
BEGIN failed--compilation aborted at /usr/bin/wakeonlan line 10.

The first 10 lines of /usr/bin/wakeonlan:

#!/usr/bin/perl
#
# $Id: wakeonlan,v 1.4.2.3 2005/01/27 16:03:54 jpo Exp $
#
#########################################################################       

use strict;
use Net::hostent;
use Socket;
use Getopt::Std;

I erased wakeonlan and installed it again, but it gives the same error.

I was not able to find any clear solution on Google. Maybe some of you guys know what the problem can be?

  • 1
    What's the full command you use? wakeonlan needs arguments. Also, you can just run wakeonlan no need for perl -w /usr/bin – terdon Sep 24 '13 at 15:43
  • You sure you have correctly installed all the perl modules? How did you installed wakeonlan? – Braiam Sep 24 '13 at 15:48
  • Have you made any changes to Getopt/Std.pm? It should be in /usr/share/perl/$PERL_VERSION/Getopt/ – terdon Sep 24 '13 at 15:52
1

The most probable reason for this error is that the Getopt/Std.pm library is damaged on your system. Try to locate it, for example with locate Std.pm; on my system, it's located here:

iserv ~ # locate Std.pm
/usr/share/perl/5.10.1/Getopt/Std.pm

Try to open it with an editor. It is 295 lines long on my system and it has to end with the line 1;. If the file is damaged or empty, you need to reinstall the package that provides this file (perl-modules on Debian).

  • Can you describe how exactly you fixed the error? Would be nice to have that for future reference. – Martin von Wittich Sep 24 '13 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.