简体   繁体   中英

VPN breaks brew update and ping

I'm trying to run brew update and get the following error:

brew update
fatal: unable to access 'https://github.com/Homebrew/homebrew.git/': Could not resolve host: github.com
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

It seems like something is messed up in my DNS resolution:

ping github.com
ping: cannot resolve github.com: Unknown host
ping google.com
ping: cannot resolve google.com: Unknown host

Though pinging google public DNS by IP works:

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=59 time=14.748 ms

I'm able to access google and github via browser just fine. I think some of the configuration for my DNS was changed when I upgraded to the OS X El Capitan beta. I'm not familiar with how that works so any help is appreciated!

UPDATE: It looks like the issue was caused by using my VPN (privateinternetaccess). Any ideas on why that would break 'ping'?

Beta 4 changed my DNS settings to some odd addresses and things would not connect. Had to get rid of Norton Internet Security and changed DNS back to Google Public DNS ( https://developers.google.com/speed/public-dns/docs/using ). To change DNS, go to System Preferences > Network > Ethernet > Advanced > DNS. You have to hit the minus sign at the bottom of the list to remove the old ones and then add the new ones one by one, starting with the IP V4 ones first.

Not sure if this is your issue, but using the Google public DNS will help clear up DNS problems so you can eliminate them.

Turns out it was an issue with Private Internet Access. They have a newer version that resolves the issue. Here are their directions in case someone else runs into the same problem:

There was a known conflict between our application and MacOS 10.11 (El Capitan), resulting in the client being unable to function correctly. We have recently released version 49 of the Mac OSX client to deal with this issue. Please remove the current installation of the PIA client software, and install v.49 from our website:

  1. Go into your Applications folder, and drag Private Internet Access.app to the Trashbin. Empty the Trashbin after doing this.
  2. Open Terminal
  3. NOTE Please make sure this step is completed very carefully. All symbols, and spacing are VERY important. Incorrect usage of this command can lead to Data loss. (It is best to simply copy and paste the command below) Type: rm -rf ~/.pia_manager/
  4. Press enter. If the command is successful, there will be no confirmation, it will simply go to a new line in the Terminal window.

Please make sure to complete step 3 very carefully.

Next, power off your computer, wait 60 seconds and turn it back on. After this, please download a fresh copy from our website ( https://www.privateinternetaccess.com/pages/client-support/ ), and give the install another try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM