hamilc
Posts: 181
Joined: Fri May 16, 2014 9:59 pm

what happened to my apt command?

Wed Jul 22, 2020 4:09 pm

I am trying to do an update so I enter at the $ prompt, "sudo -get update" and I get the following
"unable to resolve host Rpi3" Rpi3 is my pi name.

So what gives?

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: what happened to my apt command?

Wed Jul 22, 2020 4:18 pm

You have a syntax error.

The commands are
sudo apt update
sudo apt dist-upgrade -y


Copy'n'paste my blue text.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

fruitoftheloom
Posts: 23548
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: what happened to my apt command?

Wed Jul 22, 2020 4:26 pm

hamilc wrote:
Wed Jul 22, 2020 4:09 pm
I am trying to do an update so I enter at the $ prompt, "sudo -get update" and I get the following
"unable to resolve host Rpi3" Rpi3 is my pi name.

So what gives?

https://www.raspberrypi.org/documentati ... are/apt.md
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

hippy
Posts: 7902
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: what happened to my apt command?

Wed Jul 22, 2020 4:43 pm

hamilc wrote:
Wed Jul 22, 2020 4:09 pm
I am trying to do an update so I enter at the $ prompt, "sudo -get update" and I get the following
"unable to resolve host Rpi3" Rpi3 is my pi name.
Assuming "apt -get update" is merely a typo; I've seen the same "unable to resolve host" error when I haven't set the hostname in all the right places.

Use 'raspi-config' to set the hostname, reboot, and it will hopefully fix itself, "sudo apt-get update" should then work.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: what happened to my apt command?

Wed Jul 22, 2020 4:53 pm

hamilc wrote:
Wed Jul 22, 2020 4:09 pm
I am trying to do an update so I enter at the $ prompt, "sudo -get update" and I get the following
"unable to resolve host Rpi3" Rpi3 is my pi name.

So what gives?


Don't know. With my recent version of RasPiOS Buster I get this -

Code: Select all

pi@raspberrypi:~ $ sudo -get update
sudo: unknown group: et
sudo: unable to initialize policy plugin

HvdW
Posts: 104
Joined: Tue Jun 17, 2014 12:41 pm

Re: what happened to my apt command?

Wed Jul 22, 2020 5:03 pm

It's either
sudo apt update
or
sudo apt-get update

As mentioned before
sudo -get update
is a non existing command
Who knows knows
Who doesn't doesn't

Return to “Beginners”