question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`apt-get update` not working

See original GitHub issue

Description

I get an error when running the TinyPilot quick-install script like so:

curl \
  --silent \
  --show-error \
  https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/quick-install | \
    bash - && \
  sudo reboot

What’s the behavior that you expect?

I expect TinyPilot to be installed and the quick-install script to complete successfully.

What’s happening instead?

I get the following output and error:

$ curl \
>   --silent \
>   --show-error \
>   https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/quick-install | \
>     bash - && \
>   sudo reboot
+ readonly DEFAULT_TINYPILOT_SETTINGS_FILE=/home/tinypilot/settings.yml
+ DEFAULT_TINYPILOT_SETTINGS_FILE=/home/tinypilot/settings.yml
+ [[ -n '' ]]
+ set -u
++ mktemp --tmpdir=/var/tmp --suffix .yml
+ readonly TINYPILOT_SETTINGS_FILE=/var/tmp/tmp.j9nQvT9vag.yml
+ TINYPILOT_SETTINGS_FILE=/var/tmp/tmp.j9nQvT9vag.yml
+ [[ -f /home/tinypilot/settings.yml ]]
+ echo 'Using settings file at: /home/tinypilot/settings.yml'
Using settings file at: /home/tinypilot/settings.yml
+ sudo cp /home/tinypilot/settings.yml /var/tmp/tmp.j9nQvT9vag.yml
+ readonly EXTRA_VARS_PATH=@/var/tmp/tmp.j9nQvT9vag.yml
+ EXTRA_VARS_PATH=@/var/tmp/tmp.j9nQvT9vag.yml
+ add_setting_if_undefined ustreamer_port 8001
+ local key=ustreamer_port
+ local value=8001
+ grep --silent '^ustreamer_port:' /var/tmp/tmp.j9nQvT9vag.yml
+ add_setting_if_undefined ustreamer_persistent true
+ local key=ustreamer_persistent
+ local value=true
+ grep --silent '^ustreamer_persistent:' /var/tmp/tmp.j9nQvT9vag.yml
+ USE_TC358743_DEFAULTS=
+ grep --silent '^ustreamer_capture_device:' /var/tmp/tmp.j9nQvT9vag.yml
+ '[' -f /home/ustreamer/config.yml ']'
+ grep --silent 'capture_device: "tc358743"' /home/ustreamer/config.yml
+ [[ '' == \y ]]
+ add_setting_if_undefined ustreamer_encoder hw
+ local key=ustreamer_encoder
+ local value=hw
+ grep --silent '^ustreamer_encoder:' /var/tmp/tmp.j9nQvT9vag.yml
+ add_setting_if_undefined ustreamer_format jpeg
+ local key=ustreamer_format
+ local value=jpeg
+ grep --silent '^ustreamer_format:' /var/tmp/tmp.j9nQvT9vag.yml
+ add_setting_if_undefined ustreamer_resolution 1920x1080
+ local key=ustreamer_resolution
+ local value=1920x1080
+ grep --silent '^ustreamer_resolution:' /var/tmp/tmp.j9nQvT9vag.yml
+ echo 'Final install settings:'
Final install settings:
+ cat /var/tmp/tmp.j9nQvT9vag.yml
ustreamer_encoder: hw
ustreamer_format: jpeg
ustreamer_persistent: true
ustreamer_port: 8001
ustreamer_resolution: 1920x1080
tinypilot_repo_branch: master
+ HAS_PRO_INSTALLED=0
++ dirname bash
+ SCRIPT_DIR=.
+ '[' . = . ']'
+ SCRIPT_DIR=/opt/tinypilot
+ TINYPILOT_README=/opt/tinypilot/README.md
+ '[' -f /opt/tinypilot/README.md ']'
+ '[' 0 = 1 ']'
+ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Reading package lists... Done
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

It seems like the error is coming from:

$ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Reading package lists... Done
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

What are the steps to reproduce this behavior?

  1. ssh tinypilot
  2. sudo apt-get update

Workaround

I managed to get around this issue by running sudo apt update instead of sudo apt-get update. After which the TinyPilot quick-install script worked again.

$ sudo apt update -y
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] Y
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.0 MB in 11s (1137 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
183 packages can be upgraded. Run 'apt list --upgradable' to see them.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jdeanwallacecommented, Aug 27, 2021

I also managed to recreate the issue on TinyPilot Pro Hobbyist 2.2.1 (my TinyPilot debug logs for proof of version). The above fix still works besides for a very confusing one-time notice in the terminal:

root@tinypilot:~# apt-get update --allow-releaseinfo-change-suite
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.7 kB]
Fetched 13.1 MB in 12s (1128 kB/s)
Reading package lists... Done
N: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

Here’s a demo video (including my confusion about the notice).

1reaction
mtlynchcommented, Aug 26, 2021

We’re getting additional reports of this even after the fix.

I can’t reproduce it on my devices. When I update a 2.2.3 device, it updates successfully. I’ve also tried running the standard install on a clean Raspberry Pi OS Lite image (latest from May 2021), and that installs successfully, albeit with a warning message about this issue.

@jdeanwallace - Can you investigate what might be causing this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix apt-get update error on Ubuntu or Debian - Xmodulo
This error can happen when fetching the latest repositories during " apt-get update " was interrupted, and a subsequent " apt-get update "...
Read more >
Ubuntu 22.04 Apt-Get Update cant fetch updates
There's two problems here. (1) You have us.security.ubuntu.com which is wrong - that should be only security.ubuntu.com .
Read more >
Ubuntu 20.04: sudo apt-get update not Working [closed]
I am trying to install docker to my machine , but firstly just check for any updates sudo apt-get update and it is...
Read more >
Use apt-get to fix missing and broken packages - Linux Hint
Use the “fix-missing” option with “apt-get update” to run the updates and ensure the packages are up to date and there is no...
Read more >
How to Fix apt-get command not found in Linux - STechies
After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found