无法在 Raspberry Pi 3 上更新 Ubuntu 16.04

无法在 Raspberry Pi 3 上更新 Ubuntu 16.04

在 Raspberry Pi 3 上的 Ubuntu 16.04 中运行时sudo apt-get update出现错误:

Hit:1 http://packages.ros.org/ros/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ubuntu-raspi2/ppa-rpi3/ubuntu xenial InRelease                       
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial InRelease                                        
Hit:4 http://ppa.launchpad.net/ubuntu-raspi2/ppa/ubuntu xenial InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
Hit:7 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Err:6 http://ports.ubuntu.com/ubuntu-ports xenial-backports InReleaseuntu.com_ubuntu-ports_dists_xenial-backports_InRelease into data and signature failed
  Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-backports/InRelease  Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
W: Some index files failed to download. They have been ignored, or old ones used instead.

看起来检索http://ports.ubuntu.com/ubuntu-ports xenial-backports失败了。为什么会发生这种情况?我该如何修复?

编辑:我不明白其他 NODATA 问题与此有何关系。这似乎不是我的宽带提供商的“错误代理”。如果我直接使用以下命令调用资源:

wget -O  - http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/InRelease

我得到如下输出:

2f1a33dbc8b93498b44859f6c8cf9d9bc5a5c1f72054d0d52feb0f2751485dc7              183 universe/dep11/Components-s390x.yml
 ec54642b33caaf6b28a0200088de32814966b8786b83a491a84b8fe490aa6f73            10240 universe/dep11/icons-64x64.tar
 1a8035dc69d317c00924858ad17154238691176ccbc6f3137169e3f0f1dc04ae              198 universe/dep11/Components-arm64.yml.gz
 2ea4afd98631c3175062945613e23be208dcc164cd0fc8375ac2a841fc350023             4271 universe/dep11/Components-armhf.yml
 332a1ef577b05985fb8724ec094103ac6055c7cdd5737b5d1e12b1d7828c8975             2327 universe/dep11/Components-amd64.yml.gz
 abec483052ed99ff02705d8d3cb8a7280ce2207e7ba944768b5411b253ad4ff9            20480 universe/dep11/icons-128x128.tar
 396d767df35eab55dcdc55b610ed4e6b7e42e29adf52f0dba70f0dce24373e6d            72072 universe/i18n/Translation-en
 05aab47c693ab83e3abdc93c878ce7e2bbe3b466474432ea608100022c13d6ed            16982 universe/i18n/Translation-en.gz
 1b321ee64897ca1a7bc7d3f55fd686eb984d393792a4b01ed4fc37c18cc001e9              201 universe/i18n/Index
 42ccc4f1726493de34d7f63465b8c1540f486c3eefb6c7a529f381e432031eaa            15252 universe/i18n/Translation-en.xz
 034b69f2284a4be39d57d408f3a8f2934ba1d7bbaa9776c8f256a1ee633d315c            20693 universe/source/Sources
 0c55b9f86d8a8ad9861fd1276b29edf4dcf2e7b5d72d7d0039563bc55a9662ed             5480 universe/source/Sources.xz
 e04b5ace406a16905339bfe34ded375025eeeba76d6539d14d28ad0c2b61796a             5813 universe/source/Sources.gz
 304b47e8aa177a88e3dc5ffc4bcc7987e52ad0e55be19cd47762361d2a97b09b              110 universe/source/Release
Acquire-By-Hash: yes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEAREKAAYFAldqXQAACgkQQJdur0N9BbWQ4gCff6TSasTRXNHxf+oEPnKNvnPC
RnIAn2EQGmDFHnurc+sHd1O/y0b+WjCaiQIcBAEBCgAGBQJXal0AAAoJEDtP5qzA
sh8y8Q4P/jBbD2aR8jFNPjtLMJIPEGGum9WH2JARHGo8hzUA9K54UW40cjh59jz9
xLPi/DRsBwRlyGvwjH7VXM0jtBjPdMir6fHbGAyeZJUsfBPYk+UuzzANHCSfBci5
NhCsBDTN/CA3SNHpa7rQlKLg8Y3JCTBiDQlPUhbUsy5I2R+f2TQUwaKzWQHr/p80
ge1RIdfNy7os2KDAtKBmO79XiqAk1LOClqZD5EdvNdmUF4aMEF0T2P5tKjx72nLE
sKMuGFxNrNJgBoSTSC6cOfpLNbGdZISCtGrz+DtKlL9fW57ZwFKUwa2sct/RTrSw
efPY9inrwdPMGq4cd+Jxb5o3KcKkeJxGoQkk6ySCxwIm55LLvzQFR+3/jY1wNxrx
ic5pxX+DllfkNsmxrupd1P+quTrC77F1ddLF0gcJpaTFtpfNPOH7I+GnBbi6gXiw
WrlwO5dN4MFPgPMlGq6kVFgShkU2QHn6z8WOiWOAcOZaZFZ6wyU7hwATcRhR94R7
ayfKtjmfbf+AD2ZNOGErLEKvf9pRB31FxnGvz7819lwfBcHAYgFLaPBy/+T0LNTA
/k2koJaJD/Q7WwYvClAHpghPZ2o9AkdyVOgoXyyDzrHMpWjJpPcrZ5cGGuonq/lb
51pWOwNem8CWeO0AcgGsWYYHEsOevBxymPPLvo/pk4F/fmL5aFWS
=Me/z
-----END PGP SIGNATURE-----

因此它没有像其他答案暗示的那样返回“NODATA”,这就是问题所在。

答案1

问题似乎是宇宙和多元宇宙 xenial-security 存储库已损坏。

我能够通过编辑/etc/apt/sources/list和注释掉以下行来解决这个问题:

#deb http://ports.ubuntu.com/ubuntu-ports xenial-security universe
#deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security universe
#deb http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse
#deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse

故事的寓意是,警惕社区维护和专有的软件包!

相关内容