Here is how to install the mail client on AWS Graviton EC2 instance
Note: mutt not available. You can install Alpine. I think you will have to find a mutt rpm online if you really want mutt.
[ec2-user@graviton_host]$ mail
-bash: mail: command not found
[ec2-user@ip-172-31-67-136 weather_obs]$ sudo bash
[root@graviton_host]# find / -name mail
/var/mail
/var/spool/mail
/usr/local/lib/python3.7/site-packages/jedi/third_party/django-stubs/django-stubs/core/mail
[root@graviton_host]# exit
exit
[ec2-user@graviton_host]$ sudo yum install mailx
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
amzn2extra-docker | 3.0 kB 00:00
amzn2extra-epel | 3.0 kB 00:00
amzn2extra-lamp-mariadb10.2-php7.2 | 3.0 kB 00:00
amzn2extra-python3.8 | 3.0 kB 00:00
epel/aarch64/metalink | 16 kB 00:00
213 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package mailx.aarch64 0:12.5-19.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mailx aarch64 12.5-19.amzn2 amzn2-core 244 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 244 k
Installed size: 478 k
Is this ok [y/d/N]: y
Downloading packages:
mailx-12.5-19.amzn2.aarch64.rpm | 244 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : mailx-12.5-19.amzn2.aarch64 1/1
Verifying : mailx-12.5-19.amzn2.aarch64 1/1
Installed:
mailx.aarch64 0:12.5-19.amzn2
Complete!
[ec2-user@graviton_host]$ mail
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/ec2-user": 3 messages 3 new
>N 1 (Cron Daemon) Mon Apr 12 09:53 27/1110 "Cron <ec2-user@gravit"
N 2 (Cron Daemon) Thu Jun 17 00:00 30/1386 "Cron <ec2-user@gravit"
N 3 (Cron Daemon) Wed Jul 21 00:00 30/1386 "Cron <ec2-user@gravit"
& 3
Message 3:
From ec2-user@ip-172-31-67-136.ec2.internal Wed Jul 21 00:00:04 2021
Return-Path: <ec2-user@ip-172-31-67-136.ec2.internal>
X-Original-To: ec2-user
Delivered-To: ec2-user@ip-172-31-67-136.ec2.internal
From: "(Cron Daemon)" <ec2-user@ip-172-31-67-136.ec2.internal>
To: ec2-user@ip-172-31-67-136.ec2.internal
Subject: Cron <ec2-user@ip-172-31-67-136> /var/www/html/weather_obs/daily_weathe
r_obs_chart.py > /var/www/html/weather_obs/chart_out.txt
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=2948>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/1000>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/ec2-user>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=ec2-user>
X-Cron-Env: <USER=ec2-user>
Date: Wed, 21 Jul 2021 00:00:03 -0400 (EDT)
Status: R
Traceback (most recent call last):
File "/var/www/html/weather_obs/daily_weather_obs_chart.py", line 208, in <mod
ule>
print("chart_loc: ", chart_loc[0])
File "/usr/local/lib64/python3.7/site-packages/pandas/core/series.py", line 85
0, in __getitem__
return self._values[key]
IndexError: index 0 is out of bounds for axis 0 with size 0
& q
Held 3 messages in /var/spool/mail/ec2-user
[ec2-user@graviton_host]$ yum install mutt
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
You need to be root to perform this command.
[ec2-user@graviton_host]$ yum install alpine
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
You need to be root to perform this command.
You have mail in /var/spool/mail/ec2-user
[ec2-user@graviton_host]$ sudo yum install alpine
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
213 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package alpine.aarch64 0:2.21-4.el7 will be installed
--> Processing Dependency: libtinfo.so.5()(64bit) for package: alpine-2.21-4.el7.aarch64
--> Running transaction check
---> Package ncurses-compat-libs.aarch64 0:6.0-8.20170212.amzn2.1.3 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
alpine aarch64 2.21-4.el7 epel 2.2 M
Installing for dependencies:
ncurses-compat-libs aarch64 6.0-8.20170212.amzn2.1.3 amzn2-core 306 k
Transaction Summary
================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 2.5 M
Installed size: 9.9 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): ncurses-compat-libs-6.0-8.20170212.amzn2.1.3.aarch6 | 306 kB 00:00
(2/2): alpine-2.21-4.el7.aarch64.rpm | 2.2 MB 00:00
--------------------------------------------------------------------------------
Total 7.9 MB/s | 2.5 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ncurses-compat-libs-6.0-8.20170212.amzn2.1.3.aarch64 1/2
Installing : alpine-2.21-4.el7.aarch64 2/2
Verifying : ncurses-compat-libs-6.0-8.20170212.amzn2.1.3.aarch64 1/2
Verifying : alpine-2.21-4.el7.aarch64 2/2
Installed:
alpine.aarch64 0:2.21-4.el7
Dependency Installed:
ncurses-compat-libs.aarch64 0:6.0-8.20170212.amzn2.1.3
Complete!
[ec2-user@graviton_host]$ alpine
Creating subdirectory "/home/ec2-user/mail" where Alpine will
store its mail folders.
Alpine finished -- Closed folder "INBOX". Kept all 3 messages.
[ec2-user@graviton_host]$
