Debian 11 找不到軟體包

Debian 11 找不到軟體包

我最近安裝了 Debian 11 並開始亂搞,以至於我找不到任何帶有apt.例如,當我運行時sudo apt install ifconfig它返回:E: Unable to locate package ifconfig。我已經讀了十幾頁,它可能需要對我的sources.list文件做一些事情。

我檢查了文件,對我來說一切都很好。內容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

有人知道什麼可以解決這個問題?


的輸出LC_ALL=C sudo apt update是:

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.

的輸出LC_ALL=C apt search ifconfig是:

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

答案1

sources.list看起來不錯*,apt update工作,apt search工作。

sudo apt install ifconfig返回的原因E: Unable to locate package ifconfig是沒有名為 的包ifconfig

請閱讀如何找出哪個套件擁有某個檔案?名為的可執行文件ifconfig 位於名為net-tools。這應該有效並給你ifconfig

sudo apt install net-tools

注意確實apt search ifconfig在其他幾個包中找到了這個包。您聲稱「找不到任何包含apt」的軟體包似乎沒有道理。


* 除了這些non-f>,我假設是發布(或另一個文字編輯器)在截斷行時打印n>的結果,而不是發布實際的結果nano sources.list滿的內容sources.list

相關內容