linux - 安装 Perl 模块 MIME::Lite 时出错

标签 linux perl

我正在运行 Debian 9 x64,我想在 perl 中运行一个需要 MIME::Lite 模块的小脚本。要安装它,请运行此命令:

perl -MCPAN -e 'install MIME::Lite'

这是结果:

    root@XutiHTPC:/home/xuti# perl -MCPAN -e 'install MIME::Lite'
Reading '/root/.cpan/Metadata'
  Database was generated on Fri, 15 Jun 2018 10:41:02 GMT
Running install for module 'MIME::Lite'
Checksum for /root/.cpan/sources/authors/id/R/RJ/RJBS/MIME-Lite-3.030.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring R/RJ/RJBS/MIME-Lite-3.030.tar.gz with Makefile.PL
MIME::Lite is designed to take advantage of a variety of external modules
if they are not present then MIME::Lite will attempt to do its best
but its strongly recommend that you install them.

These modules are:
        MIME::Types
        Mail::Address
I can add these modules to the prereq list which will cause the files to be
automatically installed if they aren't already present
Add prereqs? [Yes]
Checking if your kit is complete...
Looks good
Warning: prerequisite Email::Date::Format 1.000 not found.
Warning: prerequisite MIME::Types 1.28 not found.
Warning: prerequisite Mail::Address 1.62 not found.
Generating a Unix-style Makefile
Writing Makefile for MIME::Lite
Writing MYMETA.yml and MYMETA.json
  RJBS/MIME-Lite-3.030.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for R/RJ/RJBS/MIME-Lite-3.030.tar.gz
---- Unsatisfied dependencies detected during ----
----        RJBS/MIME-Lite-3.030.tar.gz       ----
    Mail::Address [requires]
    Email::Date::Format [requires]
    MIME::Types [requires]
Running install for module 'Mail::Address'
Checksum for /root/.cpan/sources/authors/id/M/MA/MARKOV/MailTools-2.20.tar.gz ok
Configuring M/MA/MARKOV/MailTools-2.20.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Date::Format 0 not found.
Warning: prerequisite Date::Parse 0 not found.
Generating a Unix-style Makefile
Writing Makefile for MailTools
Writing MYMETA.yml and MYMETA.json
  MARKOV/MailTools-2.20.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MA/MARKOV/MailTools-2.20.tar.gz
---- Unsatisfied dependencies detected during ----
----       MARKOV/MailTools-2.20.tar.gz       ----
    Date::Format [requires]
    Date::Parse [requires]
Running install for module 'Date::Format'
Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/TimeDate-2.30.tar.gz ok
Configuring G/GB/GBARR/TimeDate-2.30.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Date::Parse
Writing MYMETA.yml and MYMETA.json
  GBARR/TimeDate-2.30.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for G/GB/GBARR/TimeDate-2.30.tar.gz
  GBARR/TimeDate-2.30.tar.gz
  make -- NOT OK
Running install for module 'Date::Parse'
  GBARR/TimeDate-2.30.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/TimeDate-2.30-WvSQXd
  GBARR/TimeDate-2.30.tar.gz
  Has already been prepared
  GBARR/TimeDate-2.30.tar.gz
  Could not make: Unknown error

  MARKOV/MailTools-2.20.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/MailTools-2.20-noZ3M9
  MARKOV/MailTools-2.20.tar.gz
  Has already been prepared
Running make for M/MA/MARKOV/MailTools-2.20.tar.gz
Warning: Prerequisite 'Date::Format => 0' for 'MARKOV/MailTools-2.20.tar.gz' failed when processing 'GBARR/TimeDate-2.30.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Date::Parse => 0' for 'MARKOV/MailTools-2.20.tar.gz' failed when processing 'GBARR/TimeDate-2.30.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
  MARKOV/MailTools-2.20.tar.gz
  make -- NOT OK
Running install for module 'Email::Date::Format'
Checksum for /root/.cpan/sources/authors/id/R/RJ/RJBS/Email-Date-Format-1.005.tar.gz ok
Configuring R/RJ/RJBS/Email-Date-Format-1.005.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Email::Date::Format
Writing MYMETA.yml and MYMETA.json
  RJBS/Email-Date-Format-1.005.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for R/RJ/RJBS/Email-Date-Format-1.005.tar.gz
  RJBS/Email-Date-Format-1.005.tar.gz
  make -- NOT OK
Running install for module 'MIME::Types'
Checksum for /root/.cpan/sources/authors/id/M/MA/MARKOV/MIME-Types-2.17.tar.gz ok
Configuring M/MA/MARKOV/MIME-Types-2.17.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for MIME::Types
Writing MYMETA.yml and MYMETA.json
  MARKOV/MIME-Types-2.17.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MA/MARKOV/MIME-Types-2.17.tar.gz
  MARKOV/MIME-Types-2.17.tar.gz
  make -- NOT OK
  RJBS/MIME-Lite-3.030.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/MIME-Lite-3.030-bAZrWv
  RJBS/MIME-Lite-3.030.tar.gz
  Has already been prepared
Running make for R/RJ/RJBS/MIME-Lite-3.030.tar.gz
Warning: Prerequisite 'MIME::Types => 1.28' for 'RJBS/MIME-Lite-3.030.tar.gz' failed when processing 'MARKOV/MIME-Types-2.17.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Mail::Address => 1.62' for 'RJBS/MIME-Lite-3.030.tar.gz' failed when processing 'MARKOV/MailTools-2.20.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Email::Date::Format => 1.000' for 'RJBS/MIME-Lite-3.030.tar.gz' failed when processing 'RJBS/Email-Date-Format-1.005.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
  RJBS/MIME-Lite-3.030.tar.gz
  make -- NOT OK

我尝试安装先决条件 MIME::Types 和 Mail::Address 但没有成功,MARKOV/MailTools 失败。

有什么建议吗?

非常感谢

最佳答案

我发现了问题。在安装任何新的 PERL 模块之前,Linux 必须安装 MAKE。我的 debian 9 安装是全新的,没有安装 make 命令。我跑了

apt-get install make

还有 perl 模块

perl -MCPAN -e 'install Net::SMTPS'

并且有效!

谢谢你的时间

关于linux - 安装 Perl 模块 MIME::Lite 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50874664/

相关文章:

linux - CMake错误 "attempted to write a file ... into a source directory."

regex - 为什么 $1 在 hashref 赋值中指向与多个正则表达式匹配的相同值?

linux - 有没有更好的方法来检测我的 Perl 脚本是从 "firstboot"调用的?

无法打开共享对象文件 : No such file or directory error while there is file

linux - 在 bash 函数中,如何将 stdin 放入变量中

linux - "$1/*"中的 "for file in $1/*"是什么意思

c++ - 是否可以调试包含 XS 部分的 Perl 以查看程序流程?

perl - 为什么我从 Perl 的 system() 开始的进程不是子进程?

MarkDown 源代码中的正则表达式惰性量词和否定类

java - 如何使用所有文件之间的 shell 脚本计算一些值,以便输出是所有矩阵?