无法在 Ubuntu 14.04 上更新 Phusion Passenger:gnutls_handshake() 失败:

无法在 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在我的服务器上安装更新。我在谷歌上搜索过,似乎只得到六个结果 :( 在我看来,Passenger 存储库存在一些 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.

答案1

好吧,既然没人回答,我最后只能这么做了。这比 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) ...

答案2

事实证明,当使用 构建Ubuntu 14.04apt方法https(位于 下)时,它会导致这个问题。使用 重新构建可以修复错误。我不知道到底是什么导致了这个问题。可能与/usr/lib/apt/methods/libcurl4-gnutls-devaptlibcurl4-openssl-devgnutls_handshake()这个 Git 问题有确切的错误。我也通过代理。

相关内容