我安装了Perl5.28,并安装了Net :: LibIDN,但是amavisd找不到它

时间:2018-11-11 11:16:08

标签: macos perl cpan

我在MacMini上,正在使用Homebrew进行安装。

但是-amavisd无法启动,因为显然找不到Net :: IDN模块吗?

我得到了

ERROR: MISSING REQUIRED BASIC MODULES:
Net::LibIDN
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 251.

但是我确定它已安装。

Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/install-  0.01.tar.gz ... OK
Configuring install-0.01 ... OK
Building and testing install-0.01 ... OK
Successfully installed install-0.01
Net::LibIDN is up to date. (0.12)
1 distribution installed

那我该如何告诉Perl立即找到它?

编辑: 所以我强迫重新安装-但还是没有乐趣

zeus:~ robert$ sudo cpanm --reinstall Net::LibIDN
Password:
--> Working on Net::LibIDN
Fetching http://www.cpan.org/authors/id/T/TH/THOR/Net-LibIDN-0.12.tar.gz ... OK
Configuring Net-LibIDN-0.12 ... OK
Building and testing Net-LibIDN-0.12 ... OK
Successfully reinstalled Net-LibIDN-0.12
1 distribution installed
zeus:~ robert$ 

并尝试运行amavisd ...

zeus:~ robert$ sudo /usr/local/sbin/amavisd -c /usr/local/etc/amavisd.conf debug
Password:
ERROR: MISSING REQUIRED BASIC MODULES:
  Net::LibIDN
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 251.
zeus:~ robert$ 

因此由于某种原因,看起来很奇怪-找不到新模块。只是那个模块?

1 个答案:

答案 0 :(得分:1)

这是因为amavisd使用了系统perl,而cpanm已安装到自定义perl并在那里安装了模块。

要么将模块安装到系统perl,要么尝试说服amavisd在自定义perl中运行(可能涉及手动更改其源文件中的shebang行)。