It seems like your fabric isn't running so, the first thing you need to do is go to your fabric-dev-servers folder and run ./startFabric.sh
if you get any errors there, like some containers already exist then do a ./teardownFabric.sh first then run the start command again. This will give you a basic running network with one org, one peer and one orderer.
Once your network is running then you need to create your admin card by running ./createPeerAdminCard.sh
once you reach this point then you are ready to install and start yourchaincode.
Other reason may be proxy issues, so you need to clear that in order to deploy successfully.
If you want to be an expert in your field, then enroll in Blockchain Certification by Intellipaat.