54

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
  • 69,223
  • 56
  • 216
  • 327
Samuel
  • 643
  • 1
  • 5
  • 6
  • For the ppa error see [this question](http://askubuntu.com/questions/65911/how-can-i-fix-a-404-error-when-using-a-ppa-or-updating-my-package-lists). From what you posted, I guess that updates from other sources are working OK, in which case you don't need to worry much about this error – Zanna May 24 '16 at 08:54
  • You can solve those error related to cdrom by unckecking CD ROM source in **System Settings > Software and Update** – Mostafa Ahangarha May 24 '16 at 10:58
  • Related: [How do remove the CD / DVD install as a source for apt-get packages when installing new features?](https://askubuntu.com/q/42441/830570) – Cadoiz Jun 11 '21 at 01:05

2 Answers2

69

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
PRIHLOP
  • 1,889
  • 14
  • 15
  • 6
    This should be the accepted answer. It works in desktop and server distros. – mau Apr 26 '17 at 18:23
  • Solved my problem! But can any one tell that will anything other than cdrom will be affected or not, which we are suggested to comment? (working inside a virtual-machine in VMware) – Asif Mehmood Nov 01 '17 at 11:10
  • 1
    It can`t affect anything other, only cd-rom as source for packages. – PRIHLOP Jan 05 '18 at 19:49
  • Trying to make it clear, I think it makes a difference. If you don't actually want to use the CD-ROM for an update (I don't even have one). this seems to be the answer for you or people like [mau](https://askubuntu.com/users/750683/mau), [Malik Asif](https://askubuntu.com/users/750683/malik-asif) and me. You might also want to consider this Q/A: https://askubuntu.com/q/42441/830570 – Cadoiz Jun 11 '21 at 01:01
28

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
  • 69,223
  • 56
  • 216
  • 327
Thanos Apostolou
  • 4,481
  • 2
  • 19
  • 24
  • worked for me. I am using 14.04. How did this get into the software sources in the first place? The only thing I can imagine is because I made a 16.04 USB stick with startup disk creator. – atmelino Jul 02 '16 at 17:45
  • the same reason for me – Alexey Oct 08 '16 at 06:26
  • Had this prob with PureOS, resolved via "Softare&Updates" like in your answer with these additions: In the tab "PureOS Software" where it says "Downloadable from the internet" check the box "Officially supported(main)", the tab "Other Software" uncheck the "cdrom"-box. – Ida Feb 10 '18 at 07:44
  • @atmelino: Yes, this happens after installing from USB-stick. Looks like there's a bug-report for this, but it has been closed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807996 – Ida Feb 10 '18 at 07:50
  • PS: This is one line of the error I got and searched for: E: The repository 'cdrom://[Debian GNU/Linux none _Green_ - Official Snapshot amd64 LIVE/INSTALL Binary 20180120-02:05] green Release' does not have a Release file. – Ida Feb 10 '18 at 07:52