乘客存储库证书验证失败

Passenger repository certificate verification failed

我想在我的虚拟机上安装 Passenger 服务器,所以我执行以下操作:

sudo sh -c "echo 'deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main' >> /etc/apt/sources.list.d/passenger.list"
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list

但是我更新后

sudo apt-get update

我收到以下错误:

Err https://oss-binaries.phusionpassenger.com trusty/main amd64 Packages       
  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Err https://oss-binaries.phusionpassenger.com trusty/main i386 Packages        
  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en_US    
Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en       
Fetched 2,573 kB in 11s (220 kB/s)                                             
W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-i386/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Some index files failed to download. They have been ignored, or old ones used instead.

我之前已经安装过很多次了,都没有问题。我不知道会出什么问题。

1) 尝试按照 here 所述重新安装证书。也许他们已经改变了。

2) 查看this post。它描述了类似的问题和可能的解决方案。

通过在干净的 VM 上重新安装 Ubuntu 解决了这个问题。 这个问题可能是因为我复制了我的 VM 而没有关闭它。

另一种可能的解决方案是禁用 peer-verification

可能 Docker 命令可能是:

RUN echo 'Acquire::https::oss-binaries.phusionpassenger.com::Verify-Peer "false";' > /etc/apt/apt.conf.d/99phusionpassenger-cert

您可能还想阅读另一个帖子上发布的解决方案:server certificate verification failed