Ubuntu 18.04 安装显卡驱动连接错误解决方案

给Ubuntu18.04安装显卡驱动,我的步骤:
依次执行:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall

但是在这个执行sudo ubuntu-drivers autoinstall提示连接错误:

错误:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 nvidia-driver-430 amd64 430.26-0ubuntu0~gpu18.04.1
  连接失败 [IP: 117.128.6.12 80]
E: 无法下载 http://117.128.6.12/cache/ppa.launchpad.net/graphics-drivers/ppa/ubuntu/pool/main/n/nvidia-graphics-drivers-430/nvidia-driver-430_430.26-0ubuntu0~gpu18.04.1_amd64.deb?ich_args2=506-10072314042157_cf7713ed0f1036f83245db4c349db0fb_10001002_9c89622ed0c2f5d79438518939a83798_2ad5f378a38695632bb86138d8659337  连接失败 [IP: 117.128.6.12 80]
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?

仔细对执行该命令后出现的内容进行查看:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  libllvm7
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  build-essential dkms dpkg-dev fakeroot g++ g++-7 gcc gcc-7 gcc-8-base:i386
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libasan4 libatomic1 libatomic1:i386 libbsd0:i386 libc-dev-bin libc6:i386
  libc6-dev libcilkrts5 libdrm-amdgpu1:i386 libdrm-intel1:i386
  libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
  libelf1:i386 libexpat1:i386 libfakeroot libffi6:i386 libgcc-7-dev
  libgcc1:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386
  libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libitm1 libllvm8:i386 liblsan0
  libmpx2 libnvidia-cfg1-430 libnvidia-common-430 libnvidia-compute-430
  libnvidia-compute-430:i386 libnvidia-decode-430 libnvidia-decode-430:i386
  libnvidia-encode-430 libnvidia-encode-430:i386 libnvidia-fbc1-430
  libnvidia-fbc1-430:i386 libnvidia-gl-430 libnvidia-gl-430:i386
  libnvidia-ifr1-430 libnvidia-ifr1-430:i386 libpciaccess0:i386 libquadmath0
  libsensors4:i386 libstdc++-7-dev libstdc++6:i386 libtinfo5:i386 libtsan0
  libubsan0 libvdpau1 libx11-6:i386 libx11-xcb1:i386 libxau6:i386
  libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386
  libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386
  libxfixes3:i386 libxnvctrl0 libxshmfence1:i386 libxxf86vm1:i386
  linux-libc-dev make manpages-dev mesa-vdpau-drivers nvidia-compute-utils-430
  nvidia-dkms-430 nvidia-kernel-common-430 nvidia-kernel-source-430
  nvidia-prime nvidia-settings nvidia-utils-430 pkg-config
  screen-resolution-extra vdpau-driver-all xserver-xorg-video-nvidia-430
  zlib1g:i386
建议安装:
  menu debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg
  gcc-multilib autoconf automake libtool flex bison gcc-doc gcc-7-multilib
  gcc-7-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
  libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg
  libmpx2-dbg libquadmath0-dbg glibc-doc:i386 locales:i386 glibc-doc
  lm-sensors:i386 libstdc++-7-doc make-doc libvdpau-va-gl1 nvidia-vdpau-driver
  nvidia-legacy-340xx-vdpau-driver
下列【新】软件包将被安装:
  build-essential dkms dpkg-dev fakeroot g++ g++-7 gcc gcc-7 gcc-8-base:i386
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libasan4 libatomic1 libatomic1:i386 libbsd0:i386 libc-dev-bin libc6:i386
  libc6-dev libcilkrts5 libdrm-amdgpu1:i386 libdrm-intel1:i386
  libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
  libelf1:i386 libexpat1:i386 libfakeroot libffi6:i386 libgcc-7-dev
  libgcc1:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386
  libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libitm1 libllvm8:i386 liblsan0
  libmpx2 libnvidia-cfg1-430 libnvidia-common-430 libnvidia-compute-430
  libnvidia-compute-430:i386 libnvidia-decode-430 libnvidia-decode-430:i386
  libnvidia-encode-430 libnvidia-encode-430:i386 libnvidia-fbc1-430
  libnvidia-fbc1-430:i386 libnvidia-gl-430 libnvidia-gl-430:i386
  libnvidia-ifr1-430 libnvidia-ifr1-430:i386 libpciaccess0:i386 libquadmath0
  libsensors4:i386 libstdc++-7-dev libstdc++6:i386 libtinfo5:i386 libtsan0
  libubsan0 libvdpau1 libx11-6:i386 libx11-xcb1:i386 libxau6:i386
  libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386
  libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386
  libxfixes3:i386 libxnvctrl0 libxshmfence1:i386 libxxf86vm1:i386
  linux-libc-dev make manpages-dev mesa-vdpau-drivers nvidia-compute-utils-430
  nvidia-dkms-430 nvidia-driver-430 nvidia-kernel-common-430
  nvidia-kernel-source-430 nvidia-prime nvidia-settings nvidia-utils-430
  pkg-config screen-resolution-extra vdpau-driver-all
  xserver-xorg-video-nvidia-430 zlib1g:i386
升级了 0 个软件包,新安装了 98 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
需要下载 402 kB/164 MB 的归档。
解压缩后会消耗 911 MB 的额外空间。
错误:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 nvidia-driver-430 amd64 430.26-0ubuntu0~gpu18.04.1
  连接失败 [IP: 117.128.6.12 80]
E: 无法下载 http://117.128.6.12/cache/ppa.launchpad.net/graphics-drivers/ppa/ubuntu/pool/main/n/nvidia-graphics-drivers-430/nvidia-driver-430_430.26-0ubuntu0~gpu18.04.1_amd64.deb?ich_args2=506-10072314042157_cf7713ed0f1036f83245db4c349db0fb_10001002_9c89622ed0c2f5d79438518939a83798_2ad5f378a38695632bb86138d8659337  连接失败 [IP: 117.128.6.12 80]
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?

发现它提示我们要卸载一个软件包:

下列软件包是自动安装的并且现在不需要了:
  libllvm7
使用'sudo apt autoremove'来卸载它(它们)

于是执行sudo apt autoremove进行卸载,卸载之后再执行sudo ubuntu-drivers autoinstall即可正常安装显卡驱动。

你可能感兴趣的:(Ubuntu 18.04 安装显卡驱动连接错误解决方案)