无法安装 gns3,错误 502 网关错误

无法安装 gns3,错误 502 网关错误

我有 Ubuntu 17.04,并且正在尝试使用以下命令安装 gns3:

sudo add-apt-repository ppa:gns3/ppa

输出:

 PPA for GNS3 and Supporting Packages. Please see http://www.gns3.com for more details
 More info: https://launchpad.net/~gns3/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpji7mkxvk/pubring.gpg' created
Error: retrieving gpg key timed out.

然后:

sudo apt-get update
sudo apt-get install gns3-gui

输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
  linux-image-4.10.0-37-generic linux-image-extra-4.10.0-37-generic
  linux-signed-image-4.10.0-37-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  augeas-lenses bridge-utils cpu-checker cpulimit dmeventd dns-root-data
  dnsmasq-base dynamips ebtables gns3-server ipxe-qemu libaio1 libaugeas0
  libboost-random1.62.0 libdevmapper-event1.02.1 libfdt1 libiscsi7
  liblvm2app2.2 liblvm2cmd2.02 libnetcf1 libqt5websockets5 librados2 librbd1
  libreadline5 libspice-server1 libvirt-bin libvirt-clients libvirt-daemon
  libvirt-daemon-system libvirt0 libvncserver1 libxen-4.8 libxenstore3.0
  libxml2-utils lvm2 msr-tools python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets
  qemu-block-extra qemu-kvm qemu-system-arm qemu-system-common qemu-system-x86
  qemu-utils seabios sharutils ubridge vpcs x11vnc x11vnc-data xvfb
Suggested packages:
  augeas-doc gns3 augeas-tools numad radvd auditd systemtap nfs-common
  zfsutils pm-utils thin-provisioning-tools samba vde2 qemu-efi sgabios ovmf
  debootstrap sharutils-doc bsd-mailx | mailx
The following NEW packages will be installed:
  augeas-lenses bridge-utils cpu-checker cpulimit dmeventd dns-root-data
  dnsmasq-base dynamips ebtables gns3-gui gns3-server ipxe-qemu libaio1
  libaugeas0 libboost-random1.62.0 libdevmapper-event1.02.1 libfdt1 libiscsi7
  liblvm2app2.2 liblvm2cmd2.02 libnetcf1 libqt5websockets5 librados2 librbd1
  libreadline5 libspice-server1 libvirt-bin libvirt-clients libvirt-daemon
  libvirt-daemon-system libvirt0 libvncserver1 libxen-4.8 libxenstore3.0
  libxml2-utils lvm2 msr-tools python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets
  qemu-block-extra qemu-kvm qemu-system-arm qemu-system-common qemu-system-x86
  qemu-utils seabios sharutils ubridge vpcs x11vnc x11vnc-data xvfb
0 upgraded, 52 newly installed, 0 to remove and 0 not upgraded.
Need to get 384 kB/42.9 MB of archives.
After this operation, 170 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libxenstore3.0 amd64 4.8.0-1ubuntu2.4 [19.8 kB]
Err:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libnetcf1 amd64 1:0.2.8-1ubuntu2
  502  Bad Gateway [IP: ...]
Get:3 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 qemu-block-extra amd64 1:2.8+dfsg-3ubuntu2.7 [38.1 kB]
Err:4 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 python3-pyqt5.qtwebsockets amd64 5.7+dfsg-5
  502  Bad Gateway [IP: ...]
Get:5 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 qemu-kvm amd64 1:2.8+dfsg-3ubuntu2.7 [13.2 kB]
Err:6 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libvncserver1 amd64 0.9.11+dfsg-1
  502  Bad Gateway [IP: ...]
Get:7 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 cpu-checker amd64 0.7-0ubuntu7 [6,862 B]
Ign:8 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 dns-root-data all 2015052300+h+1
Get:9 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libreadline5 amd64 5.2+dfsg-3build1 [99.5 kB]
Err:8 http://us.archive.ubuntu.com/ubuntu zesty/main i386 dns-root-data all 2015052300+h+1
  502  Bad Gateway [IP: ...]
Fetched 177 kB in 1min 10s (2,525 B/s)                                         
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/n/netcf/libnetcf1_0.2.8-1ubuntu2_amd64.deb  502  Bad Gateway [IP: ...]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pyqt5/python3-pyqt5.qtwebsockets_5.7+dfsg-5_amd64.deb  502  Bad Gateway [IP: ...]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libv/libvncserver/libvncserver1_0.9.11+dfsg-1_amd64.deb  502  Bad Gateway [IP: ...]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/d/dns-root-data/dns-root-data_2015052300+h+1_all.deb  502  Bad Gateway [IP: ...]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

注意:我尝试通过这些命令安装它几次。
上面输出的最后一行显示:运行apt-get update或尝试--fix-missing 我更新和升级了系统几次,然后我尝试安装gns3再次,但它没有工作。我不知道如何运行--fix-missing
输出--fix-missing

--fix-missing: command not found

这些命令使用基于 Ubuntu 的发行版:

sudo add-apt-repository ppa:gns3/ppa
sudo apt-get update
sudo apt-get install gns3-gui

当我无法通过这种方式安装它时,我决定使用以下命令进行安装:
基于 Debian 的发行版:

deb http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main

然后

将以下行添加到您的 /etc/apt/sources.list:

deb http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main

然后在终端中运行以下命令:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B
sudo apt-get update
sudo apt-get install gns3-gui

我无法再次安装

错误:502 网关错误

之后,我在终端中输入 gns3,输出:

The program 'gns3' is currently not installed. You can install it by typing:
sudo apt install gns3

因此我尝试使用上述命令来安装它:

sudo apt install gns3

输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dynamips libqt4-designer libqt4-help libqt4-scripttools libqt4-svg
  libqt4-test libqtassistantclient4 libxdo3 python-qt4 python-sip xdotool
Suggested packages:
  python-qt4-dbg
The following NEW packages will be installed:
  dynamips gns3 libqt4-designer libqt4-help libqt4-scripttools libqt4-svg
  libqt4-test libqtassistantclient4 libxdo3 python-qt4 python-sip xdotool
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 438 kB/10.2 MB of archives.
After this operation, 50.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libqt4-help amd64 4:4.8.7+dfsg-7ubuntu1 [207 kB]
Err:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libqt4-svg amd64 4:4.8.7+dfsg-7ubuntu1
  502  Bad Gateway [IP: ...]
Get:3 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 python-sip amd64 4.18.1+dfsg-1 [71.8 kB]
Err:4 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 libxdo3 amd64 1:3.20160805.1-3
  502  Bad Gateway [IP: ...]
Fetched 279 kB in 1min 4s (4,290 B/s)                                          
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/q/qt4-x11/libqt4-svg_4.8.7+dfsg-7ubuntu1_amd64.deb  502  Bad Gateway [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/x/xdotool/libxdo3_3.20160805.1-3_amd64.deb  502  Bad Gateway    Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dynamips libqt4-designer libqt4-help libqt4-scripttools libqt4-svg
  libqt4-test libqtassistantclient4 libxdo3 python-qt4 python-sip xdotool
Suggested packages:
  python-qt4-dbg
The following NEW packages will be installed:
  dynamips gns3 libqt4-designer libqt4-help libqt4-scripttools libqt4-svg
  libqt4-test libqtassistantclient4 libxdo3 python-qt4 python-sip xdotool
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 438 kB/10.2 MB of archives.
After this operation, 50.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libqt4-help amd64 4:4.8.7+dfsg-7ubuntu1 [207 kB]
Err:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libqt4-svg amd64 4:4.8.7+dfsg-7ubuntu1
  502  Bad Gateway [IP: ...]
Get:3 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 python-sip amd64 4.18.1+dfsg-1 [71.8 kB]
Err:4 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 libxdo3 amd64 1:3.20160805.1-3
  502  Bad Gateway [IP: ...]
Fetched 279 kB in 1min 4s (4,290 B/s)                                          
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/q/qt4-x11/libqt4-svg_4.8.7+dfsg-7ubuntu1_amd64.deb  502  Bad Gateway [IP: ...]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/x/xdotool/libxdo3_3.20160805.1-3_amd64.deb  502  Bad Gateway [IP: ...]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? [IP:...]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

现在我该怎么办?

答案1

我设法安装了它...
我需要将服务器从软件中心从美国更改为我所在地区最好的服务器
然后:

sudo add-apt-repository ppa:gns3/ppa
sudo apt-get update
sudo apt-get install gns3

不是这个:

sudo apt-get install gns3-gui

相关内容