使用 easywechat 来获取用户昵称时报错 cURL error 6: Could not resolve host: api.weixin.qq.com
1、修改文件/etc/resolvconf/resolv.conf.d/base
(这个文件默认为空)
vim /etc/resolvconf/resolv.conf.d/base
2、在文件中添加:
nameserver 8.8.8.8 nameserver 8.8.4.4
3、重启,生效!
1、修改文件/etc/resolvconf/resolv.conf.d/base
(这个文件默认为空)
vim /etc/resolvconf/resolv.conf.d/base
2、在文件中添加:
nameserver 8.8.8.8 nameserver 8.8.4.4
3、重启,生效!