jtzako has asked for the wisdom of the Perl Monks concerning the following question:

I finally got Net::OpenSSH to install but now there seems to be a missing dependency when I try to use it.

unable to load Perl module IO::Pty: Can't locate IO/Pty.pm in @INC (@I +NC contains: /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_per +l /opt/csw/share/perl/site_perl /opt/csw/lib/perl/csw /opt/csw/share/ +perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 /opt/csw/sh +are/perl/5.10.1 .) at (eval 14) line 1. at /opt/csw/share/perl/site_perl/Net/OpenSSH.pm line 917.

If I try to install IO:Pty I get another error complaining about my 'cc' installation.

cpan[1]> install IO::Pty Reading '/usr/local/home/myuser/.cpan/Metadata' Database was generated on Tue, 15 Mar 2016 18:17:02 GMT Running install for module 'IO::Pty' Checksum for /usr/local/home/myuser/.cpan/sources/authors/id/T/TO/TODD +R/IO-Tty-1.12.tar.gz ok Scanning cache /usr/local/home/myuser/.cpan/build for sizes ...................................................................... +......DONE DEL(1/3): /usr/local/home/myuser/.cpan/build/Net-OpenSSH-0.70-4mwi2l DEL(2/3): /usr/local/home/myuser/.cpan/build/Net-OpenSSH-0.70-ARY6NC DEL(3/3): /usr/local/home/myuser/.cpan/build/Bundle-CPAN-1.862-7FqW4K Configuring T/TO/TODDR/IO-Tty-1.12.tar.gz with Makefile.PL Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)... ERROR: cannot run the configured compiler '/opt/SUNWspro/bin/cc' (see conf/compilerok.log). Suggestions: 1) The compiler '/opt/SUNWspro/bin/cc' is not in your PATH. Add it to the PATH and try again. OR 2) The compiler isn't installed on your system. Install it. OR 3) You only have a different compiler installed (e.g. 'gcc'). Either fix the compiler config in the perl Config.pm or install a perl that was built with the right compiler (you could build perl yourself with the available compiler). Note: this is a system-administration issue, please ask your local admin for help. Thank you. Warning: No success on command[/opt/csw/bin/perl Makefile.PL] TODDR/IO-Tty-1.12.tar.gz /opt/csw/bin/perl Makefile.PL -- NOT OK Failed during this command: TODDR/IO-Tty-1.12.tar.gz : writemakefile NO '/opt +/csw/bin/perl Makefile.PL' returned status 512

I do have 'cc' installed but it is in /usr/ucb/cc'. However, when I tried changing the Config.pm file to the correct path, it gave me the exact same error, just with the new path listed.

Any idea how to resolve this?

Replies are listed 'Best First'.
Re: IO::Pty wont install, so I cant use Net::OpenSSH
by salva (Canon) on Mar 17, 2016 at 16:42 UTC
    I have not used Solaris for a while, but IIRC, /usr/ucb/cc was a dummy script that would just tell you to install the real compiler when invoked.

    You should be able to download the SUNWspro compiler package from the Oracle website and install it on your system.

    Alternatively you may be able to find a precompiled version of IO::Tty on some public repository for Solaris packages.

Re: IO::Pty wont install, so I cant use Net::OpenSSH
by MidLifeXis (Monsignor) on Mar 17, 2016 at 17:40 UTC

    Let me preface my following comments with the statement that it has been many years since I have managed Solaris systems, so it is possible that /opt/csw contains your locally built perl installation. Assuming that that is not the case...

    I would also recommend not messing with the system (or in this case csw application's) installed modules with direct CPAN installs. Instead, use the mechanism provided by the supplier of the /opt/csw installation of perl, or build your own Perl.

    If you directly install modules into this perl installation, you risk breaking other vendor supplied applications that rely on a certain state of that perl installation. Your updates can break the vendor environment, or vendor updates can break your environment.

    Instead, use something like perlbrew + gcc (or, if you have a compiler, the compiler that you have installed) to install a locally managed perl installation.

    --MidLifeXis

      My perl does seem to be in the csw directory, but since I am the only person using this server for anything it doesnt hurt to mod it however I need I think. Right now the only perl even in use on it is the one I'm trying to get to work with OpenSSH but having a heck of a time getting things installed.
        Do you actually have a functioning C compiler installed on that machine - one that you have verified as being capable of compiling C programs ?

        I gather that perl -V reports '/opt/SUNWspro/bin/cc' (or, at least, would have reported that before you amended Config.pm).
        It's best to use the compiler that built perl (and 'perl -V' identifies that compiler), but if you have another functioning C compiler you could give it a try.
        Just cd to any IO-Pty build directory you find in /usr/local/home/myuser/.cpan/build and run:
        make realclean perl Makefile.PL CC=/usr/bin/cc (or wherever) make test make install
        A better solution would be to follow salva's advice if possible.

        Cheere,
        Rob