Below is something like what I get when I try to install anything on my just installed OS Linux Mint Debian Edition.

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  apache2-data apache2-utils
Suggested packages:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-data apache2-utils
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 561 kB of archives.
After this operation, 1,627 kB of additional disk space will be used.
Do you want to continue? [Y/n] Err http://ftp.us.debian.org/debian/ jessie/main apache2-utils amd64 2.4.10-10
  Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org/debian/ jessie/main apache2-data all 2.4.10-10
  Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org/debian/ jessie/main apache2 amd64 2.4.10-10
  Could not resolve 'ftp.us.debian.org'

I'm assuming this is a /etc/apt/sources.list problem but I'm not sure and I don't know what to do if it is. Thanks for any and all replies.

Dani AI

Generated

This error is almost always a name‑resolution problem: apt is failing because it cannot resolve the mirror host, not because the package itself is broken. ’s log shows the DNS failure; was right to suggest testing name resolution, and correctly flagged repository choices as a later step. Below are concise diagnostics and persistent fixes that fill the gaps left by the earlier replies.

Run these checks to separate network from DNS problems:

ping -c 3 1.1.1.1
ping -c 3 ftp.us.debian.org
dig +short ftp.us.debian.org
cat /etc/resolv.conf
ls -l /etc/resolv.conf
resolvectl status

Interpretation: if the IP ping (first line) succeeds but the named ping fails, DNS is the issue. dig shows whether a DNS server returns an address. ls -l /etc/resolv.conf tells you if the file is a runtime symlink (managed by NetworkManager, systemd-resolved or resolvconf) — if it is, editing it directly will be overwritten on the next DHCP/NetworkManager event.

How to fix persistently (examples):

  • For NetworkManager-managed desktops:

    sudo nmcli connection modify "<your-connection>" ipv4.dns "1.1.1.1 9.9.9.9" ipv4.ignore-auto-dns yes
    sudo nmcli connection up "<your-connection>"
  • For systemd-resolved:

    sudo sed -i "s/^#DNS=/DNS=1.1.1.1 9.9.9.9/" /etc/systemd/resolved.conf
    sudo systemctl restart systemd-resolved

Temporary workaround: if you just need to install right now, add the mirror IP to /etc/hosts (get the IP from dig on another machine) — then run sudo apt-get update and retry the install. After DNS is fixed, remove the hosts entry.

If connectivity sometimes works (as noted), the problem may be an intermittent upstream DNS or a captive portal on the network. After making changes, always run sudo apt-get update before installing again.

Recommended Answers

All 4 Replies

I don't think this is a repository problem, but a DNS problem since the system cannot resolve ftp.us.debian.org. What happens when you try to ping that, or use nslookup to find it?

It's most likely a one time issue that occured when you tried it, the server must've been off. Pings fine now

Put "nameserver 8.8.8.8" on /etc/resolv.conf file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.