1

I'm at my wit's end trying to figure this out all night... searched google, stack, ubuntu, and raspberrypi forum a whole bunch, but just can't fix it.

What I'm really trying to do is sudo apt-get install vsftpd, but I'm getting the following error:

WARNING: The following packages cannot be authenticated!
  vsftpd
Install these packages without verification? [y/N] n

Well, I know I should first do a sudo apt-get update, but I ran into a bunch of NO_PUBKEY errors. I dug into that a bit and eventually updated my keys based on this page:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.11 (stretch)
Release:        9.11
Codename:       stretch
$ wget --quiet --output-document - https://ftp-master.debian.org/keys/archive-key-9.asc | sudo apt-key add -
OK
$ wget --quiet --output-document - https://ftp-master.debian.org/keys/archive-key-9-security.asc | sudo apt-key add -
OK

I checked my apt-key list seemed fine. Running sudo apt-get update now gives me a different message:

$ sudo apt-get update
Ign:1 http://ftp.ca.debian.org/debian stretch InRelease
Get:2 http://ftp.ca.debian.org/debian stretch Release [118 kB]
Get:3 http://ftp.ca.debian.org/debian stretch Release.gpg [2,410 B]
Hit:4 http://archive.raspberrypi.org/debian stretch InRelease
Hit:5 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Ign:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Hit:7 http://ftp.ca.debian.org/debian stretch/main Translation-en
Ign:7 http://ftp.ca.debian.org/debian stretch/main Translation-en
Hit:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Ign:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Hit:7 http://ftp.ca.debian.org/debian stretch/main Translation-en
Ign:7 http://ftp.ca.debian.org/debian stretch/main Translation-en
Ign:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Err:7 http://ftp.ca.debian.org/debian stretch/main Translation-en
  BZ2_bzread: /var/lib/apt/lists/partial/ftp.ca.debian.org_debian_dists_stretch_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)
Ign:6 http://ftp.ca.debian.org/debian stretch/main armhf Packages
Fetched 120 kB in 5s (21.0 kB/s)
Reading package lists... Done
E: Failed to fetch http://ftp.ca.debian.org/debian/dists/stretch/main/i18n/Translation-en  BZ2_bzread: /var/lib/apt/lists/partial/ftp.ca.debian.org_debian_dists_stretch_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)
E: Some index files failed to download. They have been ignored, or old ones used instead.

So nothing seems to happen. I tried sudo apt-get install vsftpd again:

WARNING: The following packages cannot be authenticated!
  vsftpd
Install these packages without verification? [y/N] n
E: Some packages could not be authenticated

Same error. This error is not only happening for this package, it's for a ton of other as well when I do sudo apt-get dist-upgrade:

WARNING: The following packages cannot be authenticated!
  debianutils bash libc6 libdb5.3 libpcre3 libselinux1 cron exim4-base
  # ... truncated about 30 lines of packages #
  python3-smbus usb-modeswitch
Install these packages without verification? [y/N] n
E: Some packages could not be authenticated

I checked the apt-cache policy vsftpd as well, seems right!

$ apt-cache policy vsftpd
vsftpd:
  Installed: (none)
  Candidate: 3.0.3-8+b1
  Version table:
     3.0.3-8+b1 500
        500 http://ftp.ca.debian.org/debian stretch/main armhf Packages
     3.0.3-8 500
        500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages

I did this for quite a few others as well, they're all from the correct repo.
I tried rebooting, same result.
I checked my internet connection, it's pinging fine.

$ ping raspbian.raspberrypi.org
PING mirrordirector.raspbian.org (93.93.128.193) 56(84) bytes of data.
64 bytes from 93.93.128.193 (93.93.128.193): icmp_seq=1 ttl=49 time=113 ms
64 bytes from 93.93.128.193 (93.93.128.193): icmp_seq=2 ttl=49 time=113 ms
64 bytes from 93.93.128.193 (93.93.128.193): icmp_seq=3 ttl=49 time=116 ms

I know that I can ultimately just allow installing without authentication. But that makes no sense if I have to do it for every single package that's shown as unauthenticated. Surely there's something I could do to update pub keys/auth to remove this annoying blocker?

I really hope I am just an idiot overlooking something obvious to you gurus. Please help this lost sheep...

5
  • 1: are you still running stretch? 2: why is your apt looking at ftp.ca.debian.org at all? have you messed around with apt sources? Feb 2, 2021 at 11:19
  • @JaromandaX yes, I'm still running stretch as far as I know from lsb_release -a. I haven't done any upgrading really. I didn't mess around with apt source though. I'm from Canada so may that's why it's pointing to ftp.ca.debian.org?
    – Idlehands
    Feb 2, 2021 at 18:46
  • I know you are still running stretch, was actually asking why :p - and I never realised raspberry pi's used "standard" debian repos! I mean, it stands to reason they do, but I've never seen mine use any debian repos Feb 2, 2021 at 21:49
  • Honestly I just kinda used my raspberry pi for minimal stuff so never bothered to do anything more... should I be upgrading? I'm not even sure how. It'll probably be another hassle-heavy night to get it done since the whole Linux env really flies over my head (though I'm happy to learn it). But thanks for trying to help, maybe I'll look into upgrading and see options.
    – Idlehands
    Feb 3, 2021 at 5:41
  • nah, if it works for you it's probably OK to leave it - upgrading stretch->buster is "not recommended" ... however, I've got one pi that has been upgraded from wheezy -> jessie -> stretch -> buster ... wasn't pretty at times, but the upgrade definitely worked Feb 3, 2021 at 5:45

1 Answer 1

1

FIXED! Reference link: https://github.com/MichaIng/DietPi/issues/2497

Turns out as my console showed, one of the partial file was corrupted so I removed the lists folder as shown in the reference link:

sudo rm -r /var/lib/apt/lists/*

After removing all the files and partial folder, I did another sudo apt-get update and this time everything updated correctly.

Afterwards I was able to sudo apt-get install vsftpd without any authentication prompt.

All this headache because one one corrupted boi... Linux is a formidable beast.

Not the answer you're looking for? Browse other questions tagged or ask your own question.