Illegal instruction (core dumped)

Hello,

I installed asterisk for the first time referring book Asterisk The Definitive Guide.

I’m using Asterisk 11 on Amazon EC2, AMI: RHEL 6.4

When I tried to run it for the first time, I got following error:

After looking into the /var/log/messages , i found below log:

# more /var/log/messages | grep asterisk
Jan 17 22:36:49 ip-172-31-32-34 kernel: asterisk[18164] trap invalid opcode ip:444897 sp:7fff4e79d900 error:0 in asterisk[400000+20a000]
Jan 17 22:36:49 ip-172-31-32-34 abrt[18165]: Saved core dump of pid 18164 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-22:36:49-18164 (1191936 bytes)
Jan 17 22:36:50 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 22:37:02 ip-172-31-32-34 kernel: asterisk[18168] trap invalid opcode ip:444897 sp:7fff0e7a88a0 error:0 in asterisk[400000+20a000]
Jan 17 22:37:02 ip-172-31-32-34 abrt[18169]: Not saving repeating crash in '/usr/sbin/asterisk'
Jan 17 22:52:45 ip-172-31-32-34 kernel: asterisk[18240] trap invalid opcode ip:444897 sp:7fff491309d0 error:0 in asterisk[400000+20a000]
Jan 17 22:52:45 ip-172-31-32-34 abrt[18241]: Saved core dump of pid 18240 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-22:52:45-18240 (1187840 bytes)
Jan 17 22:52:45 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 22:53:06 ip-172-31-32-34 kernel: asterisk[18244] trap invalid opcode ip:444897 sp:7fff82994e20 error:0 in asterisk[400000+20a000]
Jan 17 22:53:06 ip-172-31-32-34 abrt[18245]: Saved core dump of pid 18244 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-22:53:06-18244 (1191936 bytes)
Jan 17 22:53:06 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 22:54:13 ip-172-31-32-34 kernel: asterisk[18252] trap invalid opcode ip:444897 sp:7fff83d145f0 error:0 in asterisk[400000+20a000]
Jan 17 22:54:13 ip-172-31-32-34 abrt[18253]: Saved core dump of pid 18252 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-22:54:13-18252 (1191936 bytes)
Jan 17 22:54:13 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 23:02:26 ip-172-31-32-34 kernel: asterisk[18328] trap invalid opcode ip:444897 sp:7fff979dfb80 error:0 in asterisk[400000+20a000]
Jan 17 23:02:26 ip-172-31-32-34 abrt[18329]: Saved core dump of pid 18328 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-23:02:26-18328 (1191936 bytes)
Jan 17 23:02:26 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 23:03:43 ip-172-31-32-34 kernel: asterisk[18336] trap invalid opcode ip:444897 sp:7fff9d4bafa0 error:0 in asterisk[400000+20a000]
Jan 17 23:03:43 ip-172-31-32-34 abrt[18337]: Saved core dump of pid 18336 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-23:03:43-18336 (1191936 bytes)
Jan 17 23:03:43 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 23:08:09 ip-172-31-32-34 kernel: asterisk[18350] trap invalid opcode ip:444897 sp:7fffd1939970 error:0 in asterisk[400000+20a000]
Jan 17 23:08:09 ip-172-31-32-34 abrt[18351]: Saved core dump of pid 18350 (/usr/sbin/asterisk) to /var/spool/abrt/ccpp-2015-01-17-23:08:09-18350 (1187840 bytes)
Jan 17 23:08:09 ip-172-31-32-34 abrtd: Executable '/usr/sbin/asterisk' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jan 17 23:08:23 ip-172-31-32-34 kernel: asterisk[18355] trap invalid opcode ip:444897 sp:7fff94da7490 error:0 in asterisk[400000+20a000]
Jan 17 23:08:23 ip-172-31-32-34 abrt[18356]: Not saving repeating crash in '/usr/sbin/asterisk'

Can anyone help me please?

Regards,
Maq

Asterisk wasn’t built for the hardware simulated by the EC2, or, if built on the EC2, the EC2 is lying about its hardware capabilities.

Build Asterisk for generic hardware.