Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Perl Upgrade Issue: Invalid Argument error

by chora_sid (Novice)
on May 16, 2018 at 12:53 UTC ( #1214653=perlquestion: print w/replies, xml ) Need Help??
chora_sid has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

Our application runs on Perl 5.5 on Solaris 5.8. We are trying to upgrade perl version as Perl 5.5 is not compatible with Oracle 10g client.

As I didn't get Perl 5.18 or above package for Solaris online, I have downloaded Perl 5.22 package for Unix(all variants)from ActivePerl site. I have updated my Perl code(Shebang line) to point to new Perl. However, I am getting below error while hitting the URL which calls a CGI file:

HTTP4068: cannot execute CGI script indexaf.cgi (exec() failure Invalid argument)

Can anyone please help on this.

#!/Path/to/New/Perl/Package -T use strict; use English; use lib '../../ddc/cgi-bin/'; use UPRO; use DDCGI; use DBI; use common; use indexaf; &indexaf::indexaf;

Replies are listed 'Best First'.
Re: Perl Upgrade Issue: Invalid Argument error
by Corion (Pope) on May 16, 2018 at 13:13 UTC

    Can you run the script from the command line?

    Try to run it as


    From the correct directory that contains indexaf.cgi.

    This line looks very suspicious to me:

    #!/Path/to/New/Perl/Package -T

    This does not point to a Perl interpreter. It should maybe look like:

    #!/Path/to/New/Perl/Package/bin/perl -T

    ... or something like that.

Re: Perl Upgrade Issue: Invalid Argument error
by marto (Archbishop) on May 16, 2018 at 13:10 UTC

      Can anyone please advise how should I upgrade Perl version on Solaris 8. On ActivePerl site, there is a package available for 5.22 - 5.24. However, its generic for all Unix and not specific to Solaris. I have downloaded Package for Perl 5.22 but not sure how to install it. Also, bin/perl binary has perl-static written in it. Is it soft link to perl-static file. Can anyone please advise.

        Ideally you consult with your system administrator on how to upgrade your version of Perl.

        Personally, I would recommend installing it under (for example) /opt/perl5.22/ so it doesn't conflict with the system perl or other installations.

        If you have questions regarding the ActivePerl Enterprise Edition, I suggest that you consult with ActiveState directly. No other versions of Perl as provided by ActiveState seem to be available for Solaris.

        In my experience, building a standard Perl for Solaris is fairly easy. Following the Installation From Source instructions should give you your own Perl installation that you can use in parallel to the existing version. Again, I recommend configuring it that the new Perl sits under /opt/perl-5.26 instead of overwriting /usr/bin/perl. Replacing the system Perl will bring far more problems than it solves usually.

        Corion is right, install your own perl elsewhere, leave the system perl alone. Also Solaris 5.8 is 6 years out of support, you won't be getting any patches for problems.

        Update: so pretty much the same advice as last time :P

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1214653]
Approved by marto
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-11-13 02:36 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (149 votes). Check out past polls.