无法在 Ubuntu 16.04 上安装 php7.2

我已成功将我的 AWS EC2 实例升级到 Ubuntu16.04 并想从 ondrej/php 安装 php7.2


问题是,过去 2 个小时我一直在尝试此操作,但无济于事。我已经运行了 apt-get update,每次我这样做时,它都无法连接到 ppa.launchpad.net (91.189.95.83)。它会超时,我无法获得http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease


# apt-get update

Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease

Hit:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease                    

Hit:3 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease                  

Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]                                                

Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease                                                         

Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out

Fetched 109 kB in 2min 0s (909 B/s)                

Reading package lists... Done

W: Failed to fetch 

http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  

Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out

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

我试过 wget -O /dev/null http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease它可以下载它。我试过 ping 91.189.95.83 并且它有效。我只是无法执行 apt-get update 和随后的 apt-get install php7.2


有没有人遇到过这个问题并设法解决了它?


慕少森
浏览 571回答 2
2回答

梦里花落0921

使用系统设置> ubuntu 中的软件更新更新它,更新后运行命令sudo apt-get update
打开App,查看更多内容
随时随地看视频慕课网APP