unable to launch go app, github.com/gorilla/mux

Wanting to test out a sample API app from swagger.io using golang on CentOS7 and found the simple start not so simple. The short answer is that is required git to pull the required packages from github to compile the program.

This host was a fairly new CentOS7 host with very few installed packages. I wanted to work with the pets api sample from swagger.io using golang. But as you can see below it failed to launch.

unable to find package for gorilla/mux.
trying to install gorilla/mux directly.

So I tried to install gorilla/mux directly and noticed that it was not able to pull the package from github. This made me wonder if I had git installed, I did not. Simple solution simple fix?

sudo yum install git -y

Yes, simple fix, after that it was really simple again.

Stop Network Manager overwriting resolv.conf

Arg.. I updated /etc/resolv.conf and later after a reboot or restarting my network services NetworkManager pulls out my updates. So to stop this here is what have found works for me.

  1. Update /etc/resolv.conf as I wish
  2. edit NewtworkManager.conf
    sudo vi /etc/NetworkManager/NetworkManager.conf
  3. add dns=none under [main]
  4. restart NetworkManager to ensure my /etc/resolv.conf is left alone
  5. Wonder why I didn’t sort this out sooner 🙂