首页 > 解决方案 > 无法在 Ubuntu 18.04 上加载 SimpleXML

问题描述

我最近在 Ubuntu 18.04 服务器上安装了一个 phabricator 本地实例,我正在将其配置为使用 Amazon SES 处理出站电子邮件,在配置了提到的所有步骤之后,我正在尝试使用./bin/mail send-test --to以下失败的电子邮件功能测试错误:

Reading message body from stdin...
[2020-07-10 06:28:19] EXCEPTION: (Exception) The PHP SimpleXML extension is not available, but this extension is required to send mail via Amazon SES, because Amazon SES returns API responses in XML format. Install or enable the SimpleXML extension. at [<phabricator>/externals/amazon-ses/ses.php:84]
arcanist(head=master, ref.master=65cda1596f25), phabricator(head=master, ref.master=205657ac76a2)
  #0 SimpleEmailService::__construct called at [<phabricator>/src/applications/metamta/adapter/PhabricatorMailAmazonSESAdapter.php:62]
  #1 PhabricatorMailAmazonSESAdapter::executeSend called at [<phabricator>/externals/phpmailer/class.phpmailer-lite.php:592]
  #2 PHPMailerLite::Send called at [<phabricator>/src/applications/metamta/adapter/PhabricatorMailAmazonSESAdapter.php:45]
  #3 PhabricatorMailAmazonSESAdapter::sendMessage called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:750]
  #4 PhabricatorMetaMTAMail::sendWithMailers called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:555]
  #5 PhabricatorMetaMTAMail::sendNow called at [<phabricator>/src/applications/metamta/PhabricatorMetaMTAWorker.php:22]
  #6 PhabricatorMetaMTAWorker::doWork called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
  #7 PhabricatorWorker::executeTask called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:163]
  #8 PhabricatorWorker::scheduleTask called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:525]
  #9 PhabricatorMetaMTAMail::save called at [<phabricator>/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php:228]
  #10 PhabricatorMailManagementSendTestWorkflow::execute called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492]
  #11 PhutilArgumentParser::parseWorkflowsFull called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:377]
  #12 PhutilArgumentParser::parseWorkflows called at [<phabricator>/scripts/mail/manage_mail.php:21]

我已经安装了php7.2-xml

我的部署环境如下:

Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic

PHP:

Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.7, Copyright (c), by Zend Technologies

标签: phpsimplexmlphp-7.2phabricator

解决方案


php-7.2-xml 与 7.4 不兼容,我安装了 7.4-xml 并且成功了!


推荐阅读