首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能对一套可安装的产品进行更好的改造。

不能对一套可安装的产品进行更好的改造。
EN

Stack Overflow用户
提问于 2017-09-25 14:40:57
回答 2查看 251关注 0票数 0

我试图安装软件包zendmail,但是我发现了下面的错误

代码语言:javascript
复制
k15@k15-Aspire-4732Z:~/Documents/strawberry$ composer require zendframework/zend-mail
Using version ^2.8 for zendframework/zend-mail
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - Installation request for phpunit/php-code-coverage (locked at 4.0.8) -> satisfiable by phpunit/php-code-coverage[4.0.8].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
Linter
Severity  Provider  Description Line

我不知道该怎么处理这个错误。请帮我解决这个问题。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-09-25 14:44:19

您需要为php安装DOM功能(如错误消息phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.所示)

这看起来(从扩展的输出)像一台基于Debian的机器。apt install php7.0-xml应该允许您继续。

票数 0
EN

Stack Overflow用户

发布于 2017-09-25 14:45:48

在2中,默认情况下将有邮件包,您可以只使用这段代码。

代码语言:javascript
复制
use Zend\Mail;

$mail = new Mail\Message();
$mail->setBody('This is the text of the email.');
$mail->setFrom('Freeaqingme@example.org', 'Sender\'s name');
$mail->addTo('Matthew@example.com', 'Name o. recipient');
$mail->setSubject('TestSubject');

$transport = new Mail\Transport\Sendmail();
$transport->send($mail);

作为参考,您可以访问此页面,https://framework.zend.com/manual/2.1/en/modules/zend.mail.introduction.html

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46407954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档