大家好,首先是我的安装命令
wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz
tar -xzf perl-5.16.1.tar.gz
cd perl-5.16.1
./Configure -des -Dprefix=/usr/local/perl
make && make test && make install
perl -v
前面的命令执行都没有问题,到执行make && make test && make install这一步,一直报下面的错
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
### ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
### setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness
### LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness
### export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
u=4.06 s=3.87 cu=396.83 cs=100.49 scripts=2165 tests=493255
make: *** [test] Error 1
根据报错信息来看时test时没有路径依赖,百度之后尝试以下方法
vi /root/.bashrc
再最底部加上
export LC_ALL=C
或者直接运行
echo "export LC_ALL=C" >> /root/.bashrc
然后执行一下:
source /root/.bashrc
之后继续执行make && make test && make install名称,发现还是报同样的错误,之后我把make && make test && make install命令分开执行
1、先执行make,没有报error
2、执行make test报error,我们不管他,直接执行下一个命令
3、执行make install
最后发现perl -v已经显示安装成功了