1

So based on instructions I was given on stackoverflow, I was attempting to install a new version of Perl on my 64 bit Solaris virtual machine using perlbrew, in order to ultimately install 'cpanm' and install the CGI and DBI modules, as well as the DBD::Oracle driver. These are the steps I was following:

1) Open up a terminal window and login as the root user. Then install the following packages...

  • pkg install system/header
  • pkg install gcc-45
  • pkg install developer/build/gnu-make
  • pkg install archiver/gnu-tar

2) Install perlbrew...

  • curl -kL http://install.perlbrew.pl | bash

3) Next, open up ~/.bash_profile or ~/.profile and append the following line of code..

  • vi ~/.bash_profile OR vi ~/.profile
  • append source ~/perl5/perlbrew/etc/bashrc to the end of the file
  • log out of root
  • log back into root
  • Additionally, you may have to manually source the file by entering: source ~/perl5/perlbrew/etc/bashrc if the next few steps do not seem to work.

4) Begin to install the new Perl.

  • echo $PERLBREW_ROOT --> this should equal /home/oracle/perl5/perlbrew
  • perlbrew -v install perl-5.16.0 -Dcc=gcc

    Output From Installation:

Test Summary Report
    -------------------
    ../cpan/CGI/t/tmpdir.t                                          (Wstat: 0 Tests: 9 Failed: 0)
      TODO passed:   3, 6, 8
    ../cpan/Socket/t/getnameinfo.t                                  (Wstat: 256 Tests: 14 Failed: 1)
      Failed test:  10
      Non-zero exit status: 1
    Files=2334, Tests=522101, 1212 wallclock secs (90.50 usr 58.34 sys + 533.70 cusr 288.26 csys = 970.80 CPU)
    Result: FAIL
    *** Error code 1
    make: Fatal error: Command failed for target `test_harness'
    Installed /home/oracle/perl5/perlbrew/build/perl-5.16.0 as perl-5.16.0 successfully. Run the following command to switch to it.

      perlbrew switch perl-5.16.0
  • perlbrew switch perl-5.16.0

However, when I try to switch to the new perl, it says: perl-5.16.0 is not installed.

So I did a ls $PERLBREW_ROOT and found it contains a bin, build, build.log, Config.pm, dists, etc, and perls directory. And thus I figure the new Perl should be installed in the perls directory, but doing an ls $PERLBREW_ROOT/perls shows that there is nothing in the perls directory. Does anyone have any idea what may be going wrong?

This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81

1 Answers1

3

It misreports it as being installed when it fails due to test failures. If you believe the test failure is acceptable, you run it again skipping the tests:

perlbrew -v install perl-5.16.0 --notest -Dcc=gcc
                                ^^^^^^^^

This is the test that is failing:

my $expect_host = gethostbyaddr( inet_aton( "127.0.0.1" ), AF_INET );
defined $expect_host or $expect_host = "127.0.0.1";
( $err, $host, $service ) = getnameinfo( pack_sockaddr_in( 80, inet_aton( "127.0.0.1" ) ), NI_NUMERICSERV );
is( $host, $expect_host, "\$host is $expect_host for NS" );

If you scroll up in your log output, you'll see the values you actually got for $host and $expect_host.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • So that did seem to work, and there does seem to be a perl-5.16.0 in the **perls** directory now. However, when I go to install the DBI module using: `cpanm -v DBI` it still fails. I put the output in the OP. – This 0ne Pr0grammer Jun 07 '12 at 16:45
  • 1
    For better results, start a new question – ikegami Jun 07 '12 at 16:46
  • Haha, seems like I'm starting an endless array of questions. I was just trying to keep it less cluttered, but if that's your suggestion, will do. – This 0ne Pr0grammer Jun 07 '12 at 16:49
  • 1
    You're question will get more exposure, and figuring out what is a reply to what will be simpler. – ikegami Jun 07 '12 at 16:50
  • 1
    You'll need to provide way more info than you that which posted. We have no idea which tests failed and for what reason, so we can't help you address the failures. – ikegami Jun 07 '12 at 16:52
  • Just made a new thread. Will try posting more of the error code as well. – This 0ne Pr0grammer Jun 07 '12 at 16:56
  • @ikegame Question, where would I find more of the error though? I can't seem to gather too much info from the actual terminal screen, and I looked in the build.log but there seems to be no relevant information there either. – This 0ne Pr0grammer Jun 07 '12 at 17:02
  • 1
    "Installing DBI failed. See /home/oracle/.cpanm/build.log for details." – ikegami Jun 07 '12 at 17:03
  • Right, I looked in there, but there wasn't any real error messages other than the same `FAIL ! Installing DBI failed. See /home/oracle/.cpanm/build.log for details.` – This 0ne Pr0grammer Jun 07 '12 at 17:16
  • I'm not familiar with `cpanm`. If you use `cpan DBI` instead, the output will be output to the terminal. – ikegami Jun 07 '12 at 19:21