0

My goal is to get the PHP mail() function to work on Amazon Linux. So the best option seems to be to install msmtp (found in EPEL repository) but I get a dependency error.

I run run sudo yum --enablerepo=epel install msmtp but then get:

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)

These are the details of the Amazon Linux instance:

NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"

According to /etc/yum.repos.d/epel.repo it uses EPEL 6.

TheStoryCoder
  • 234
  • 3
  • 13

2 Answers2

1

I know this is old. But I ran into same issue. Managed to find a way. So I'm sharing solution just in case someone is looking for a solution: you can install epel repo with "sudo amazon-linux-extras install epel -y" on amazon linux 2. Then you should be able to "yum install msmtp" Details here: https://aws.amazon.com/fr/premiumsupport/knowledge-center/ec2-enable-epel/

Alassane
  • 11
  • 1
0

EPEL is not compatible with Amazon Linux. If you need to use packages from EPEL, you need to use a distribution compatible with it, such as CentOS or RHEL.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Are you really sure of that? According to AWS docs https://aws.amazon.com/amazon-linux-ami/faqs/ under "How do I enable the EPEL repository" it certainly should be possible. Also according to https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/ – TheStoryCoder Feb 06 '19 at 19:29
  • It's extremely unfortunate that Amazon is advertising use of EPEL with Amazon Linux, because it actually is not compatible, except on occasion by happy accident some packages might happen to install and function. EPEL is not designed or intended to work with Amazon Linux. It never has been and it's unlikely that EPEL will ever change to work with Amazon Linux, because that would break it for the distros it actually works with, RHEL/CentOS and actual clones thereof (like Scientific Linux). – Michael Hampton Feb 06 '19 at 19:38
  • Further: Amazon Linux is _not_ a clone of CentOS. It is a _fork_. Amazon Linux was forked from CentOS 5 (2007). Amazon Linux 2 was forked from CentOS 7. Both have diverged so heavily since being forked that many packages for RHEL/CentOS don't work on Amazon Linux anymore. Which is where you are today. – Michael Hampton Feb 06 '19 at 19:43