Ubuntu 20.04,1 无法安装 perl 模块

Ubuntu 20.04,1 无法安装 perl 模块

例如 File::Slurp

Reading '/root/.cpan/Metadata'
  Database was generated on Sun, 06 Dec 2020 19:29:03 GMT
Running install for module 'File::Slurp'
Checksum for /root/.cpan/sources/authors/id/C/CA/CAPOEIRAB/File-Slurp-9999.32.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring C/CA/CAPOEIRAB/File-Slurp-9999.32.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for File::Slurp
Writing MYMETA.yml and MYMETA.json
  CAPOEIRAB/File-Slurp-9999.32.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for C/CA/CAPOEIRAB/File-Slurp-9999.32.tar.gz
Can't exec "make": No such file or directory at /usr/share/perl/5.30/CPAN/Distribution.pm line 2225.
  CAPOEIRAB/File-Slurp-9999.32.tar.gz
  make -- NOT OK
  No such file or directory
Failed during this command:
 CAPOEIRAB/File-Slurp-9999.32.tar.gz          : make NO``` 

答案1

cpan 工具用于make安装 Perl 模块。您需要make先安装。

跑步

sudo apt-get install build-essential

安装它。

相关内容