LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apt-get update not working on newly installed Debian 10 (https://www.linuxquestions.org/questions/linux-newbie-8/apt-get-update-not-working-on-newly-installed-debian-10-a-4175675428/)

Trent29 05-17-2020 01:52 PM

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?

shruggy 05-17-2020 02:11 PM

Code:

sed -i '/\<cdrom:/s/^/#/' /etc/apt/sources.list

quickbreakfast 05-18-2020 04:49 PM

Quote:

Originally Posted by Trent29 (Post 6124307)
Just installed Debian 10 yesterday using ubootin and the Debian 10 .iso-1 file.

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:

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.


Anyone know what went wrong with the installation or how to fix this?

Though not a Debian user, I would not mind betting that you have not connected to a Debian mirror outside of the install device. So apt get is searching the install medium for the program and when not found gives you the message.

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.

HappyTux 05-18-2020 06:40 PM

Quote:

Originally Posted by Trent29 (Post 6124307)
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?

These have the contrib and non-free added to the lines, you can remove them if offended by their presence. As another has mentioned you are only setup for the install medium in your sources.list from the looks of the error message. Try this in your sources.list you can change the .de in the lines to your country code to see if they have mirrros that are faster than the german ones.

Code:

root@haswell:/home/seeder1# cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main

#deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main

deb http://ftp.de.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.de.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ buster-updates main contrib non-free

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.


Trent29 05-19-2020 02:03 PM

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.

hazel 05-19-2020 02:14 PM

Quote:

Originally Posted by Trent29 (Post 6125015)
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.

It's somewhere inside /etc/apt. All system configuration files are stored under /etc.

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.

quickbreakfast 05-19-2020 03:13 PM

Quote:

Originally Posted by Trent29 (Post 6125015)
And I'm not sure how to "uncomment a mirror". Is there a command you could provide to run inside a particular folder? Thanks.

Technically no, there is not a command to run.

What you need to do is open the /etc/apt/sources.list file, as root type

Code:

nano /etc/apt/sources.list
Find the mirror you want to use, press the delete key to remove the "#" sign at the beginning of the address of the mirror you want to use.

Save the amendment as you exit.

I suggest you update and upgrade your system before you install anything new.

jefro 05-19-2020 03:25 PM

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.

Roken 05-19-2020 05:08 PM

Quote:

Originally Posted by jefro (Post 6125066)
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.


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.

Trent29 05-20-2020 11:39 AM

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. :)

Trent29 05-23-2020 03:37 PM

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. :)

michaelk 05-23-2020 03:51 PM

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.

Roken 05-23-2020 11:05 PM

Quote:

Originally Posted by Trent29 (Post 6126420)
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) .........Why didn't this work?


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).

hazel 05-24-2020 03:04 AM

Quote:

Originally Posted by Trent29 (Post 6126420)
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. :)

There's copying and copying! If you use an ordinary file copy instruction in either Windows or Linux, the iso file gets copied over just like any other file. That isn't bootable. Your firmware looks for boot code in specific places and not inside files. If you have a BIOS (or a UEFI working in legacy mode), it looks in the first sector of the drive. A native UEFI looks for an EFI system partition and for a named .efi file within it. Neither will look inside a .iso file.

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.

Trent29 05-24-2020 12:54 PM

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.