I have this problem I cannot solve. It appears during the installation process of Ubuntu 18.04 on my External Hard Drive. When the process starts checking the APT it gives me the aforementioned error. I have seen the solution on the forum to write this command in the terminal:
sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom
But it does not work for me. It only says that no such file exists.
Does anybody know how to fix this issue? If you need more details that I have not mentioned here, please ask me.