【问题标题】:Error installing Perl module MIME::Lite安装 Perl 模块 MIME::Lite 时出错
【发布时间】:2018-06-15 21:28:36
【问题描述】:

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

perl -MCPAN -e '安装 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 失败。

有什么建议吗?

非常感谢

【问题讨论】:

    标签: linux perl


    【解决方案1】:

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

    apt-get install make
    

    还有 perl 模块

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

    并且有效!

    感谢您的宝贵时间

    【讨论】:

      【解决方案2】:

      看起来您正在使用系统 Perl。那么为什么不使用模块的预打包版本呢?

      $ sudo apt-get install libmime-lite-perl
      

      【讨论】:

      • 糟糕。愚蠢的错字。谢谢@daxim。
      • 嗨,谢谢它安装了 MIME:Lite。现在脚本要求我使用 Net::SMTPS。我尝试使用 apt-get install libnet-smtp-ssl-perl 安装它,但它已经安装了。并且 perl -MCPAN -e 'install Net::SMTPS' 也无法运行 Make。谢谢
      • @Xuti:sudo apt-get install libnet-smtps-perl。 CPAN 发行版名称和 .deb 文件名之间有一个非常简单的映射。
      猜你喜欢
      • 2017-06-08
      • 2011-11-14
      • 1970-01-01
      • 2020-08-07
      • 2013-04-28
      • 2014-02-18
      • 2016-05-04
      • 2011-10-10
      • 2014-09-30
      相关资源
      最近更新 更多