I used to add contrib
& non-free
to my apt sources, but found they're gone from jammy:
$ sudo apt update
W: Skipping acquire of configured file 'contrib/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' doesn't have the component 'contrib' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' doesn't have the component 'non-free' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'contrib/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' doesn't have the component 'contrib' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' doesn't have the component 'non-free' (component misspelt in sources.list?)
Then, how to fix common problems like:
E: Package 'rar' has no installation candidate
E: Package 'unrar' has no installation candidate
$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main contrib non-free restricted universe
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main contrib non-free restricted universe
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
rar
andunrar
packages are available from themultiverse
repository. It is enabled by default if it is a regular Ubuntu release.contrib
andnon-free
are not Ubuntu repositories, but Debian.