With which user to you run this? When you are on Linux you normally need to be root to access raw ICMP sockets.
root