dyld:惰性符号绑定失败:未找到符号:_perl_tsa_mutex_lock

时间:2017-03-21 08:21:07

标签: perl email send

我安装了Net-SSLeay,用于发送带有SSL的电子邮件。当我尝试运行perl脚本时,遇到了以下错误:

dyld: lazy symbol binding failed: Symbol not found:    
_perl_tsa_mutex_lock
 Referenced from: /opt/local/lib/perl5/site_perl/5.24/darwin-thread-  
 multi-2level/auto/Net/SSLeay/SSLeay.bundle
 Expected in: flat namespace

Perl脚本:

sub _send_email {
#{{{#

 my $from = $from;
 my $smtpserver = $smtpserver;
 my $smtpport = 25;
 my $smtpuser   = $stmpuser;
 my $smtppassword = $password;  

 my $transport = Email::Sender::Transport::SMTP->new({
  host => $smtpserver,
  port => $smtpport,
  sasl_username => $smtpuser,
  sasl_password => $smtppassword,
});

 my $email = Email::Simple->create(
 header => [
  To      => $to,
  From    => $from,
  Subject => 'Subject',
],
body => "You personal userId  is: 1111\n You personal user code is: 9999\n" ,
 );

try{
 sendmail($email, {transport => $transport});
 }
catch{     
   print "sending email failed";
}
 #}}}#
}

知道这个错误吗?谢谢。

0 个答案:

没有答案