2

I recently installed Debian 11 and started messing around to the point where I can't find any packages with apt. For example, when I run sudo apt install ifconfig it returns: E: Unable to locate package ifconfig. I've read on a Dozen of pages that it would probably have to do something with my sources.list file.

I checked the file and everything seems fine to me. Contents of sources.list:

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

deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-f> deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib n>

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

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

deb http://archive.debian.org/debian stretch main contrib non-free

Does anyone have a clue on what could possibly fix this?


The output of LC_ALL=C sudo apt update is:

Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian buster-backports InRelease
Ign:5 http://archive.debian.org/debian stretch InRelease
Hit:6 http://archive.debian.org/debian stretch Release
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

The output of LC_ALL=C apt search ifconfig is:

Sorting... Done
Full Text Search... Done
gnome-nettool/oldstable 3.8.1-3 amd64
  network information tool for GNOME

inetutils-tools/oldstable 2:2.0-1+deb11u1 amd64 base networking utilities (experimental package)

iproute2/oldstable,now 5.10.0-4 amd64 [installed] networking and traffic control tools

libnet-ifconfig-wrapper-perl/oldstable 0.26-1 all multiplatform Perl wrapper for ifconfig

libnet-interface-perl/oldstable 1.016-1+b5 amd64 Perl module for manipulating host network interfaces

libsys-hostip-perl/oldstable 2.120-1 all Perl module to determine local machine's IP address

moreutils/oldstable 0.65-1 amd64 additional Unix utilities

net-tools/oldstable 1.60+git20181103.0eebece-1 amd64 NET-3 networking toolkit

python-sh/oldoldstable 1.11-1 all Python subprocess interface

python3-sh/oldstable 1.14.1-1 all Python 3 subprocess interface

wmifinfo/oldstable 0.11-1 amd64 Dockapp that shows information for all interfaces

Rikkerdt
  • 21
  • 1
  • 2

1 Answers1

2

Your sources.list looks fine*, apt update works, apt search works.

The reason sudo apt install ifconfig returns E: Unable to locate package ifconfig is there is no package named ifconfig.

Please read How do I find out which package owns a file? An executable named ifconfig is in a package named net-tools. This should work and give you ifconfig:

sudo apt install net-tools

Note apt search ifconfig did find this package among few others. Your claim that you "can't find any packages with apt" seems unjustified.


* Except these non-f> and n> which I assume are results of posting what nano sources.list (or another text editor) prints when it truncates lines, instead of posting the actual full content of sources.list.