apt-get update not working on newly installed Debian 10
Just installed Debian 10 yesterday using ubootin and the Debian 10 .iso-1 file. I don't have a DVD or other optical drive on my laptop, so I installed it using the "USB Installation Method" from this Wikihow link https://www.wikihow.com/Install-Debian
Now whenever I as root user try to use apt-get update or apt-get install <name of program> I get a message like this: root@Owner:/home/user# sudo apt update Ign:1 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster InRelease Err:2 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs Hit:3 http://deb.debian.org/debian buster InRelease Reading package lists... Done E: The repository 'cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Anyone know what went wrong with the installation or how to fix this? |
Code:
sed -i '/\<cdrom:/s/^/#/' /etc/apt/sources.list |
Quote:
To fix this, as root, uncomment a SINGLE mirror in the relevant file. https://linuxconfig.org/how-to-find-...t-sources-list will find you the quickest mirror for you. |
Quote:
Code:
root@haswell:/home/seeder1# cat /etc/apt/sources.list |
Thanks for the great replies! I'll give them a try. And yes you are correct, I have not connected to a Debian mirror outside of the install device. Just to be clear, I open a terminal in the sources.list folder and run the commands you've provided? Where would I find the sources.list folder?
And I'm not sure how to "uncomment a mirror". Is there a command you could provide to run inside a particular folder? Thanks. |
Quote:
The comment sign in any configuration file is a # at the beginning of a line. If you want the line to be used and not ignored as a comment, just edit out the # sign. You will need to be root to do this. My advice when editing any config file for the first time is to make a backup copy of it with the .orig suffix. That way you can always get it back again if you make a mess of the edit. |
Quote:
What you need to do is open the /etc/apt/sources.list file, as root type Code:
nano /etc/apt/sources.list Save the amendment as you exit. I suggest you update and upgrade your system before you install anything new. |
Doesn't the Software Manager also have a tab for sources?? Seems you can just uncheck that optical and be sure to include the online repos.
|
Quote:
Assuming that he/she has a desktop installed, which we don't know. A quick edit of sources.list is by far the easiest option all around. |
Thanks so much for the great responses everyone. Yes it is a desktop. And now, after reading your explanations, I remember that I have uncommented a command or two in the past. But I'll check out Software Manager too. :)
|
Decided to Try Reinstall of Debian 10 First
There were other issues other than apt-get install not working, like not recognizing sudo commands.
So I looked in the Debian Installation Guide and it said specifically NOT to use unetbootin as the installer, because it changes the .iso file. Unfortunately, that's what I had used. So I decided to try reinstalling Debian 10 on the computer HDD. So I copied the Debian 10 DVD .iso- 1 file onto a 32 GB USB drive that I formatted NTFS (the 4GB .iso file wouldn't copy onto a FAT32 formatted USB) Per the instructions, the Debian 10 .iso- 1 file was the only file on the entire drive. The instructions said to change the BIOS to boot from USB, which I did and which I know I had done correctly because it had booted successfully from unetbootin. The instructions said the .iso file should be all you need to install Debian. When I tried to boot from the USB, all I got was a blank screen with a blinking cursor. What did I do wrong? Why didn't this work? I thought I followed the instructions to the letter. :) |
If creating the USB drive from windows you need win32diskimager. Just copying the ISO file to drive will not create a bootable device.
If creating the USB drive from linux you can use the dd or cp command as show on the debian website. |
Quote:
Because this is completely wrong. the .iso is a disk image and is meant to be burned to a dvd or usb thumb drive. You can use either your favourite dvd burning software to put it on a dvd, or balenaEtcher to burn it to a thumb drive. Then you boot from that installation media (either the dvd or the usb as appropriate). |
Quote:
When you copy an iso image to a raw drive, the legacy bootloader in the first sector of the image goes into the first sector of the drive and an ESP with suitable boot files on it gets copied over too. You can do such a raw copy in LInux by using dd, as mentioned by michaelk; in Windows you must use special software. |
Thanks so much to all 3 of you for the great detailed explanations! Much appreciated. :hattip:
That's the way I initially thought it was supposed to work. But consider my failures. I tried first with unetbootin, had all of the above mentioned problems, then found out from the official Debian Install Guide that unetbootin is specifically not to be used because it changes the .iso. Then I tried Universal USB Installer - failed, so I tried to follow directly the install guide with pure .iso. I'll try balenaEtcher. Any suggested alternative installers if balenaEtcher fails? :) |
All times are GMT -5. The time now is 06:57 PM. |