Ubuntu-14.04
無法在 Ubuntu 14.04 上更新 Phusion Passenger:gnutls_handshake() 失敗:
幾個月前,我在這裡使用 HOWTO 在 Ubunut 14.04 上安裝了 Phusion Passenger:https ://www.phusionpassenger.com/library/install/apache/install/oss/trusty/
最近,在更新系統包(apt-get update)時,我注意到下面關於乘客儲存庫的錯誤。此時,我必須註釋掉這些條目,
/etc/apt/sources.list.d/passenger.list
以便在我的伺服器上安裝更新。我搜尋了Google,似乎只得到了六個結果:(在我看來,Passenger repo 有一些 SSL 問題。有人知道出了什麼問題以及如何解決這個問題嗎?Err https://oss-binaries.phusionpassenger.com trusty/main amd64 Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. Err https://oss-binaries.phusionpassenger.com trusty/main i386 Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en Fetched 2945 kB in 12s (241 kB/s) W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-i386/Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. E: Some index files failed to download. They have been ignored, or old ones used instead.
事實證明,當 Ubuntu 14.04
apt
方法https
(位於 下/usr/lib/apt/methods/
)是用 建構的時libcurl4-gnutls-dev
,它會給我帶來這個問題。重建修復錯誤apt
。我不知道到底是怎麼回事。可能與這個 Git 問題有關,確切的錯誤。我也正在通過代理。libcurl4-openssl-dev``gnutls_handshake()
好吧,由於沒有人在這裡回答,這就是我最終要做的。它比 Samsquanch 更油膩,但至少更新了乘客。希望有人有更好的答案。
一般的想法是使用
sources.list
在遠端倉庫上建構文件名的路徑,然後使用 wget 下載並使用 dpkg 安裝。# aptitude update ... Err https://oss-binaries.phusionpassenger.com trusty/main i386 Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en Err https://oss-binaries.phusionpassenger.com trusty/main amd64 Packages gnutls_handshake() failed: A TLS packet with unexpected length was received. ... Fetched 9860 kB in 15s (651 kB/s) W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-i386/Packages: gnutls_handshake() failed: A TLS packet with unexpected length was received. W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages: gnutls_handshake() failed: A TLS packet with unexpected length was received. ... # wget https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages -O pkgs ... 2016-09-16 14:25:28 (392 KB/s) - 'pkgs' saved [419785/419785] # grep Filename pkgs | grep passenger ... Filename: pool/trusty/main/liba/passenger/libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb ... Filename: pool/trusty/main/p/passenger/passenger_5.0.30-1~trusty1_amd64.deb # cat /etc/apt/sources.list.d/passenger.list deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
passenger.list 的前綴必須轉到 wget,然後附加
Filename:
您需要下載的 deb 的 Packages 文件中的部分。# wget https://oss-binaries.phusionpassenger.com/apt/passenger/pool/trusty/main/p/passenger/passenger_5.0.30-1~trusty1_amd64.deb ... Saving to: 'passenger_5.0.30-1~trusty1_amd64.deb.1' # wget https://oss-binaries.phusionpassenger.com/apt/passenger/pool/trusty/main/liba/passenger/libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb ... Saving to: 'libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb' # dir -rw-r--r-- 1 root root 291470 Jul 25 15:26 libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb -rw-r--r-- 1 root root 1661194 Jul 25 15:26 passenger_5.0.30-1~trusty1_amd64.deb # dpkg -i libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb (Reading database ... 71071 files and directories currently installed.) Preparing to unpack libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb ... Unpacking libapache2-mod-passenger (1:5.0.30-1~trusty1) over (1:5.0.30-1~trusty1) ... Setting up libapache2-mod-passenger (1:5.0.30-1~trusty1) ... * Reloading web server apache2 * # dpkg -i passenger_5.0.30-1~trusty1_amd64.deb (Reading database ... 71071 files and directories currently installed.) Preparing to unpack passenger_5.0.30-1~trusty1_amd64.deb ... Unpacking passenger (1:5.0.30-1~trusty1) over (1:5.0.30-1~trusty1) ... Setting up passenger (1:5.0.30-1~trusty1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ...