今天在安裝sublimeText3插件時遇到錯誤,彈出一個對話框說沒有可供安裝的包,內容為There are no packages available for installation,對話框如下圖:
據說是IPv6的原因,如果我們的Intent服務提供者(ISP)不支持IPv6就會引發上述錯誤,原文如下:
This error is happened with IPv6 problem. If your Internet Service Provider (ISP) does not support for IPv6 you got this error.
解決方法(Windows平台)
Step 1:
Get IPv4 address of sublime.wbond.net
Try this command line on terminal ping sublime.wbond.net
Now you can get IPv4 address of sublime.wbond.net.
Step 2:
Now open hosts file from C:Windowssystem32driversetc
folder and add this line (replcae {IPv4 address})
{IPv4 address} sublime.wbond.net
.
All is ok. Let's play with Package controller.
從上面的描述可以知道首先需要獲取sublime.wbond.net網站的IPv4地址,然后修改hosts文件就行了。
Hosts文件在C:\Windows\System32\drivers\etc 目錄下(我的是WIN7 64位系統)
如果在終端使用ping命令時遇到如下錯誤
可以到這里(在線Ping工具)查尋其IP地址:http://serve.netsh.org/pub/ping.php