简体   繁体   中英

Issue while installing DBI Perl module via CPAN prompt on Solaris 11

I am getting error " sh: cc: not found " when I try to install DBI module from CPAN prompt. Is there any way to resolve this? I have already installed gcc compiler from gnu site.

        $ which gcc
        /bin/gcc
        $

and environment variable is already set like this cc=gcc

But, still I got this error:

cc -c    -I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -xO3    -DVERSION=\"1.643\"  -DXS_VERSION=\"1.643\" -KPIC "-I/usr/perl5/5.12/lib/sun4-solaris-64int/CORE"  -DDBI_NO_THREADS Perl.c
sh: cc: not found
*** Error code 127
make: Fatal error: Command failed for target `Perl.o'
Current working directory /root/.cpan/build/DBI-1.643-2
  TIMB/DBI-1.643.tar.gz
  /usr/bin/make -- NOT OK
Failed during this command:
 TIMB/DBI-1.643.tar.gz                        : make NO

In order to avoid any binary incompatibilities, Perl expects all C code to be compiled with the same compiler as was used to build Perl itself. It looks like you're using the standard Solaris installation of Perl. That will have been built with the Solaris C compiler, not with gcc (you can check by running perl -V:cc ).

So you're going to need the Solaris C compiler installed in order to install any CPAN modules that require C code to be compiled.

It's been years (decades probably) since I used Solaris. Is there no standardised package repository that you can use to install extra packages - something like RedHat's rpm ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM