Ich habe vor Kurzem Debian 11 installiert und angefangen, herumzuspielen, bis ich keine Pakete mit finden kann apt
. Wenn ich beispielsweise ausführe, sudo apt install ifconfig
wird Folgendes zurückgegeben: E: Unable to locate package ifconfig
. Ich habe auf einem Dutzend Seiten gelesen, dass es wahrscheinlich etwas mit meiner sources.list
Datei zu tun hat.
Ich habe die Datei überprüft und für mich scheint alles in Ordnung zu sein. Inhalt 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
Hat jemand eine Ahnung, wie das Problem möglicherweise behoben werden könnte?
Die Ausgabe LC_ALL=C sudo apt update
lautet:
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.
Die Ausgabe LC_ALL=C apt search ifconfig
lautet:
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
Antwort1
Ihr sources.list
sieht gut aus*, apt update
funktioniert, apt search
funktioniert.
Der Grund für sudo apt install ifconfig
die Rückgabe E: Unable to locate package ifconfig
ist, dass kein Paket mit dem Namen vorhanden ist ifconfig
.
Bitte lesen SieWie finde ich heraus, welchem Paket eine Datei gehört?Eine ausführbare Datei namensifconfig
befindet sich in einem Paket namensnet-tools
. Dies sollte funktionieren und Ihnen Folgendes geben ifconfig
:
sudo apt install net-tools
Note apt search ifconfig
hat dieses Paket unter einigen anderen gefunden. Ihre Behauptung, dass Sie „keine Pakete mit finden können apt
“, scheint ungerechtfertigt.
* Außer diesen non-f>
und n>
von denen ich annehme, dass sie Ergebnisse davon sind, was nano sources.list
(oder ein anderer Texteditor) druckt, wenn er Zeilen abschneidet, anstatt die tatsächlichevollInhalt von sources.list
.