參考博文:https://blog.csdn.net/weixin_40192129/article/details/78610974
vmware tools需要perl環境的支持
yum install perl* (yum安裝perl相關支持)
yum install cpan (perl需要的程序庫,需要cpan的支持,詳細自行百度)
注:如果你對perl模塊版本要求比較高,希望是新版的那么請按照一下安裝:
yum install perl
yum install cpan
以后有什么需要直接用cpan編譯安裝。
下載源碼包:
官網地址:http://www.cpan.org/src/
[root@akinlau /]#wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz
解壓源碼包:
[root@akinlau /]# tar -zxvf perl-5.16.1.tar.gz
編譯並安裝,目錄可以自定義
[root@akinlau /]# cd perl-5.16.1
[root@akinlau perl-5.16.1]# ./Configure -des -Dprefix=/usr/local/perl
[root@akinlau perl-5.16.1]# make
[root@akinlau perl-5.16.1]# make test
[root@akinlau perl-5.16.1]# make install
如果系統以前已安裝了舊版本的perl的話,替換系統原有的版本。
[root@akinlau perl-5.16.1]# mv /usr/bin/perl /usr/bin/perl.bak
[root@akinlau perl-5.16.1]# ln -s /usr/local/perl/bin/perl /usr/bin/perl
再看看是不是最新的版本
[root@akinlau perl-5.16.1]# perl -v
This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux
Copyright 1987-2012, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using “man perl” or “perldoc perl”. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
如果看到以上信息,就證明安裝成功了
一個干凈的centos系統是沒有相關支持的,以至於在操作過程中會出現各類異常,像是編譯,像是wget command not found等,整個make的過程是時間非常長的,需要耐心等待。
問題1:wget不被識別
yum install wget
問題2:make命令不被識別
yum install gcc
reboot
再次make
perl -v