0

I m new to linux, trying to install packages like apache, wget, nfs-common etc as per requirement. But not even a single package is getting installed, all are giving -

Candidate failed like error-

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wget is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'wget' has no installation candidate

Output from sudo apt update

~$ sudo apt update
Err:1 https://download.docker.com/linux/debian buster InRelease
  Temporary failure resolving 'download.docker.com'
Err:2 http://cdn-fastly.deb.debian.org/debian stable InRelease
  Temporary failure resolving 'cdn-fastly.deb.debian.org'
Err:3 http://ftp.us.debian.org/debian stable InRelease
  Temporary failure resolving 'ftp.us.debian.org'
Err:4 http://deb.debian.org/debian buster-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Err:5 http://cdn-fastly.deb.debian.org/debian-security stable/updates InRelease
  Temporary failure resolving 'cdn-fastly.deb.debian.org'
Err:6 http://ftp.us.debian.org/debian stable-updates InRelease
  Temporary failure resolving 'ftp.us.debian.org'
Err:7 http://deb.debian.org/debian stable InRelease
  Temporary failure resolving 'deb.debian.org'
Err:8 http://deb.debian.org/debian stable-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Err:9 http://deb.debian.org/debian-security stable/updates InRelease
  Temporary failure resolving 'deb.debian.org'
Ign:10 cdrom://[Debian GNU/Linux 10.9.0 _Buster_ - Official amd64 NETINST 20210327-10:38] buster InRelease
Err:11 cdrom://[Debian GNU/Linux 10.9.0 _Buster_ - Official amd64 NETINST 20210327-10:38] 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
Err:12 http://security.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:13 http://security.debian.org stable/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:14 http://ftp.debian.org/debian buster-backports InRelease
  Temporary failure resolving 'ftp.debian.org'
Err:15 https://packages.debian.org/stable/web buster InRelease
  Temporary failure resolving 'packages.debian.org'
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 10.9.0 _Buster_ - Official amd64 NETINST 20210327-10:38] 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.

Have also updated sources.list for download packages, that is also getting failed

Details of sources.list

# deb cdrom:[Debian GNU/Linux 10.9.0 _Buster_ - Official amd64 NETINST 20210327-10:38]/ buster main

deb cdrom:[Debian GNU/Linux 10.9.0 _Buster_ - Official amd64 NETINST 20210327-10:38]/ buster main

# Line commented out by installer because it failed to verify:
deb http://security.debian.org/debian-security buster/updates main
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster-updates main

# new custom url
deb [arch=amd64] https://download.docker.com/linux/debian buster stable

# custom url 2 for debian
deb https://packages.debian.org/stable/web/ buster web

# custm url

deb http://cdn-fastly.deb.debian.org/debian stable main
deb http://cdn-fastly.deb.debian.org/debian-security stable/updates main


#------------------------------------------------------------------------------#
#                   OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian buster-backports main
deb-src http://ftp.debian.org/debian buster-backports main

# Debian Ressources
deb http://ftp.us.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stable main contrib non-free

deb http://ftp.us.debian.org/debian/ stable-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stable-updates main contrib non-free

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

Operating System: Debian GNU/Linux 10 (buster)

4
  • It appears that your system fails to resolve domains via DNS. Try running dig stackexchange.com to confirm
    – Panki
    Apr 23, 2021 at 9:58
  • @Panki Have tried your recommendation, dig is not available as installed package, and trying to install with sudo apt install dig same error is occurring as asked
    – Vino
    Apr 23, 2021 at 11:29
  • 1
    If dig is not currently installed, getent hosts stackexchange.com should test hostname resolution using only tools within the libc-bin package. And if you don't have libc-bin installed, your OS is probably broken anyway, as libc-bin is marked essential so even the most minimal installations should have it.
    – telcoM
    Apr 23, 2021 at 19:35
  • 1
    Also, for the cdrom, try as the output suggests and use apt-cdrom add to see if it can properly add your cdrom(s)/dvd(s) as a source for packages, and change the end of the line from ... ` main` to ... ` main contrib` in case your hardware drivers are weird. Finally, connect to your network with a physical cable, not WiFi. Many issues are caused because WiFi requires some extra drivers, setup, and packages to get it working correctly.
    – C. M.
    Apr 24, 2021 at 7:19

2 Answers 2

1

Error which occurred was coz of not resolving sources list while using package manager apt install * command. Confusion occurred, when same link was getting resolved with curl -I "http://..."

So, after configuring proxy settings for package manager apt, able to download required packages,

Set proxy for APT package manager

$ sudo nano /etc/apt/apt.conf.d/80proxy

Acquire::http::proxy "http://10.10.1.10:8080/";
Acquire::https::proxy "https://10.10.1.10:8080/";
Acquire::ftp::proxy "ftp://10.10.1.10:8080/";

Here is the link which I have used for understanding proxy settings and configuration-

Thank You @GAD3R @Panki @telcoM

I got hint and guidance from your comments and answer :)

0

You have some duplicates sources in your sources.list. Also disable the cdrom repo. To correct your sources.list, use the following command (here-document copy and past in the terminal):

cat <<EOF |sudo tee /etc/apt/sources.list

deb [arch=amd64] https://download.docker.com/linux/debian buster stable

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

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

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

EOF

Then run:

echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" |sudo tee -a /etc/resolv.conf
sudo apt update
sudo apt install wget

Debian: Sources.list

1
  • Thanks buddy, issue got resolved, I m not sure if it was due to sources file, but coz of your answer I got hint of proxy settings. After configuring proxy in sudo nano /etc/apt/apt.conf.d/80proxy was able to download packages without any issue
    – Vino
    Apr 24, 2021 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.