A tsunami warning has been issued after the powerful magnitude 7.7 earthquake, which was followed by several aftershocks.