add-apt-repository 傳回意外的長度錯誤

add-apt-repository 傳回意外的長度錯誤

Ubuntu 11.10 (oneiric ocelot):
當我嘗試透過 add-apt-repository 新增的 ppa 時,它會返回:

rene@rene-MS-N104:~$ sudo add-apt-repository ppa:tualatrix/ppa
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 88, in <module>
    ppa info = get_ppa_info_from_lp(usr, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp
    curl.perform()
pycurl.error(35, 'gnutls_handshake() failed: A TLS packet with unexpected length was recieved.')

我對 Ubuntu 相當陌生,不知道該如何繼續。

答案1

看來這是一個已知問題/錯誤,您可以嘗試以下解決方法:

若要安裝 PPA,請將它們新增至/etc/apt/sources.list以下表單:

前:

ppa:<user>/<repo>

添加sources.list

deb http://ppa.launchpad.net/<user>/<repo>/ubuntu oneiric main

然後sudo apt-get update下載你想要的任何套件。

答案2

就我而言,這很有效,這就是我在 Ubuntu 12.04 中所做的:

sudo apt-get clean
sudo apt-get update

然後我嘗試像往常一樣添加我的 ppa :

sudo add-apt-repository ppa:.../...

希望它對每個人都有效!

答案3

我在使用WiFi時也遇到了同樣的問題。但後來我嘗試使用自動 PPP 的行動寬頻連接,效果很好。我不確定,但這可能與 WiFi 路由器中連接埠 11371 的開放有關。

答案4

解決方法請參考以下網址。

https://gnutls-help.gnutls.narkive.com/sqMssk7Q/big-ca-certificate-bundle-causes-problems-with-gnutls-3-0-11

引自評論之一在連結中。

避免此問題的快速解決方案是將您為伺服器啟用的 CA 限制為所需的最低限度(典型的伺服器只需要信任簽署使用者憑證的機構)。

相關內容