Linux 中 安装perl模块 以及 确认
001、系统信息
(base) [root@pc1 ~]# cat /etc/redhat-release ## 系统信息 CentOS Linux release 7.6.1810 (Core)
002、安装CPAN
(base) [root@pc1 ~]# yum -y install perl-CPAN ## 安装 perl-CPAN模块
003、以JSON为例,在未安装状态下查看
(base) [root@pc1 ~]# perldoc JSON ## 查看是否安装 ,没有安装
004、利用cpan -i JSON安装该模块
(base) [root@pc1 ~]# cpan -i JSON ## 安装JSON模块
005、查看JSON 安装状态
(base) [root@pc1 ~]# perldoc JSON | head ## 出现以下状态,说明已经安装
参考:
01、https://www.onitroad.com/jc/linux/faq/find-out-what-perl-modules-already-installed-on-my-system.html