Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top