$ pod install : Could not resolve host: github.com

$ pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.2.1)

[!] Error installing AFNetworking
[!] /usr/bin/git clone https://github.com/AFNetworking/AFNetworking.git /var/folders/1s/63m_bnm17157ykcv4d0b2r8m0000gn/T/d20190327-11815-1y5w7ly --template= --single-branch --depth 1 --branch 3.2.1

Cloning into '/var/folders/1s/63m_bnm17157ykcv4d0b2r8m0000gn/T/d20190327-11815-1y5w7ly'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': Could not resolve host: github.com

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

$ sudo vi /etc/hosts

i 启动编辑模式,然后添加github的地址

localhost is used to configure the loopback interface

when the system is booting. Do not change this entry.

127.0.0.1 localhost
255.255.255.255 broadcasthost
192.30.255.112 github.com //github地址
::1 localhost
fe80::1%lo0 localhost

esc
:wq 退出即可

你可能感兴趣的:($ pod install : Could not resolve host: github.com)