我的目标是让 PHPmail()
函数在 Amazon Linux 上运行。因此,最好的选择似乎是安装msmtp
(在 EPEL 存储库中找到),但我收到依赖项错误。
我运行sudo yum --enablerepo=epel install msmtp
但得到:
Loaded plugins: priorities, update-motd, upgrade-helper
1053 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package msmtp.x86_64 0:1.4.32-1.el6 will be installed
--> Processing Dependency: libgsasl.so.7(LIBGSASL_1.1)(64bit) for package: msmtp-1.4.32-1.el6.x86_64
--> Processing Dependency: libgnome-keyring.so.0()(64bit) for package: msmtp-1.4.32-1.el6.x86_64
--> Processing Dependency: libgsasl.so.7()(64bit) for package: msmtp-1.4.32-1.el6.x86_64
--> Running transaction check
---> Package libgsasl.x86_64 0:1.4.0-4.el6 will be installed
--> Processing Dependency: libntlm.so.0()(64bit) for package: libgsasl-1.4.0-4.el6.x86_64
---> Package msmtp.x86_64 0:1.4.32-1.el6 will be installed
--> Processing Dependency: libgnome-keyring.so.0()(64bit) for package: msmtp-1.4.32-1.el6.x86_64
--> Running transaction check
---> Package libntlm.x86_64 0:1.3-2.2.amzn1 will be installed
---> Package msmtp.x86_64 0:1.4.32-1.el6 will be installed
--> Processing Dependency: libgnome-keyring.so.0()(64bit) for package: msmtp-1.4.32-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: msmtp-1.4.32-1.el6.x86_64 (epel)
Requires: libgnome-keyring.so.0()(64bit)
以下是 Amazon Linux 实例的详细信息:
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
据悉/etc/yum.repos.d/epel.repo
它使用 EPEL 6。
答案1
我知道这已经过时了。但我遇到了同样的问题。设法找到了一种方法。所以我分享解决方案以防有人正在寻找解决方案:您可以在 amazon linux 2 上使用“sudo amazon-linux-extras install epel -y”安装 epel repo。然后您应该能够“yum install msmtp”详细信息在这里:https://aws.amazon.com/fr/premiumsupport/knowledge-center/ec2-enable-epel/
答案2
EPEL 与 Amazon Linux 不兼容。如果您需要使用来自 EPEL 的软件包,则需要使用与其兼容的发行版,例如 CentOS 或 RHEL。