I unable to install aerospike in mac

Are you running the server with Vagrant or in a Docker container? You may find these vagrant and docker articles useful in connecting a client to the server (specifically the port forwarding part).