我卸载掉gcc以及跟gcc相关的包,只留下cc,然后再重新./configure,make,make check,make install,这样就所有检查都通过,并且安装成功,但是接下来我去安装Math-GMP-2.05时,它提示:
root@solaris01 # cd Math-GMP-2.05
root@solaris01 # perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgmp
Writing Makefile for Math::GMP
==========================================================
WARNING! No GMP libraries were detected!
Please see the INSTALL file.
===========================================================
直接安装GMP的二进制包,也是一样的结果,安装成功,但是对 Math-GMP-2.05 perl Makefile.PL失败。
是否还需要设置其他环境变量,或者参数?
我的LD_LIBRARY_PATH设置是:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
就差这一个了,请大家帮帮忙,谢谢!
以下是gmp-4.2.4, make install的结果,之前的make check,是:
==================
All 9 tests passed
==================
===================
All 10 tests passed
===================
===================
All 56 tests passed
===================
root@solaris01 # make install
make install-recursive
Making install in tests
Making install in .
Making install in devel
Making install in mpn
Making install in mpz
Making install in mpq
Making install in mpf
Making install in rand
Making install in misc
Making install in cxx
Making install in mpbsd
Making install in mpn
Making install in mpz
Making install in mpq
Making install in mpf
Making install in printf
Making install in scanf
Making install in cxx
Making install in mpbsd
Making install in demos
Making install in calc
make install-am
Making install in expr
Making install in tune
Making install in doc
test -z "/usr/local/info" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/info"
.././install-sh -c -m 644 './gmp.info' '/usr/local/info/gmp.info'
.././install-sh -c -m 644 './gmp.info-1' '/usr/local/info/gmp.info-1'
.././install-sh -c -m 644 './gmp.info-2' '/usr/local/info/gmp.info-2'
test -z "/usr/local/lib" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/lib"
/bin/bash ./libtool --mode=install ./install-sh -c 'libgmp.la' '/usr/local/lib/libgmp.la'
./install-sh -c .libs/libgmp.so.3.4.4 /usr/local/lib/libgmp.so.3.4.4
(cd /usr/local/lib && { ln -s -f libgmp.so.3.4.4 libgmp.so.3 || { rm -f libgmp.so.3 && ln -s libgmp.so.3.4.4 libgmp.so.3; }; })
(cd /usr/local/lib && { ln -s -f libgmp.so.3.4.4 libgmp.so || { rm -f libgmp.so && ln -s libgmp.so.3.4.4 libgmp.so; }; })
chmod +x /usr/local/lib/libgmp.so.3.4.4
./install-sh -c .libs/libgmp.lai /usr/local/lib/libgmp.la
./install-sh -c .libs/libgmp.a /usr/local/lib/libgmp.a
chmod 644 /usr/local/lib/libgmp.a
ranlib /usr/local/lib/libgmp.a
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- use the `-RLIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/include"
./install-sh -c -m 644 'gmp.h' '/usr/local/include/gmp.h'
test -z "/usr/local/include" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/include"
make install-data-hook
+-------------------------------------------------------------+
| CAUTION: |
| |
| If you have not already run "make check", then we strongly |
| recommend you do so. |
| |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs. GMP tends to |
| explore interesting corners in compilers and has hit bugs |
| on quite a few occasions. |
| |
+-------------------------------------------------------------+