I just created an Ubuntu 21.04 USB thumb drive and booted it in Live/Try mode.
I opened a terminal and ran sudo apt update
and sudo apt-get install apt-file
:
ubuntu@ubuntu:~$ sudo apt update
Ign:1 cdrom://Ubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420) hirsute InRelease
Hit:2 cdrom://Ubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420) hirsute Release
Hit:4 http://archive.ubuntu.com/ubuntu hirsute InRelease
Get:5 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Get:6 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Fetched 209 kB in 1s (286 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
280 packages can be upgraded. Run 'apt list --upgradable' to see them.
ubuntu@ubuntu:~$ sudo apt-get install apt-file
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package apt-file is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'apt-file' has no installation candidate
But as you can see it fails.
So I check the apt-cache
and it should indeed be available:
ubuntu@ubuntu:~$ apt-cache dump | grep apt-file
Package: apt-file
Depends: apt-file (null)
Then I checked if it was already installed:
ubuntu@ubuntu:~$ which apt-file
ubuntu@ubuntu:~$
But nope...
Then I checked the online database: https://packages.ubuntu.com/hirsute/apt-file
And again it should be there.
Then I tried, just for fun, to install a different package. sudo apt-get install ncdu
, but I got the same error... Then I tried to install sudo apt-get install vim
and that worked! But I still can't install the other packages.
What is going on here?