60

Every time I try update (using sudo apt-get update) my Ubuntu I get this problem:

W: The repository 'cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

How can I fix it?
I use Ubuntu 16.04 LTS

Zanna
  • 72,312
Samuel
  • 703

3 Answers3

82

To resolve this problem from terminal you must remove/comment this CD-ROM repository source directly from /etc/apt/sources.list

 sudo nano /etc/apt/sources.list

and comment or remove lines that include cdrom. eg:

deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.3)]/ xenial main restricted

In Ubuntu 24.04 and later Ubuntu software sources have been moved to /etc/apt/sources.list.d/ubuntu.sources. As a result the command cat /etc/apt/sources.list returns # Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources in Ubuntu 24.04 and later.

Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb URIs: http://security.ubuntu.com/ubuntu/ Suites: noble-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Ubuntu 24.04 uses a new format for managing sources. Sources are stored in separate files within the /etc/apt/sources.list.d/ directory, each named with a .list or .sources extension (example: ondrej-ubuntu-php-noble.sources).

karel
  • 122,292
  • 133
  • 301
  • 332
PRIHLOP
  • 2,108
  • 16
  • 15
29

Try this:
Open Software & Updates and in the Ubuntu Software tab uncheck Cdrom with Ubuntu 16.04 LTS 'Xenial Xerus' under the section Installable from CD-ROM/DVD.

Zanna
  • 72,312
1

Disable the cdrom:

sudo sed -e '/cdrom/s/^/#/' -i /etc/apt/sources.list
sudo apt update